chrometweaks.org

I've started a iPage web hosting business and...?

Click Here To View All Answers...


Quick question: I've started a iPage web hosting business and...? Hoping for any comment. My 2nd question... Below is my code:.

But when you run it inside a web page, observe the text box controls carefully.(their left side).

They're not exactly aligned properly! Is there any way to solve this? Thanks a lot!..

Comments (19)

I'm stumped. I'm not so sure what is the right answer. I'll do some research and get back to you if I bump into an useful answer. You should email the people at iPage as they probably could assist you..

Comment #1

Your td tags are not ok..

And with width you can set the td tags;.

<! HTML Markup startspan >.

<form action="whatever" method="whatever" etc="value">.

<table><tr><td width="100">*Name:</td><td><input type="text" name="Name"></td></tr></table>.

<table><tr><td width="100">*Subject:</td><td><input type="text" name="Subject"></td></tr></table>.

<table><tr><td width="100">*E-mail:</td><td><input type="text" name="E-mail"></td></tr></table>.

</form>.

<! HTML Markup endspan >..

Comment #2

I am not sure why the form now has three tables in it, rather than just three rows..

That is nothing like the code in my original post..

You will also need to set the form.

Action.

,.

Method.

And any other.

Attribute values.

Of the.

<form>.

To be whatever you require them to be. I have not provided those in my example...

Comment #3

I also do not understand why you are writing code to the.

HTML version 2.0.

Standard. Something like.

HTML 4.01 Transitional.

Would be a lot better. You'll need the start of your code to be something like this:.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">.

<html>.

<head>.

<title> Your Title Here </title>.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">.

<meta http-equiv="Content-Language" content="EN-GB">.

<meta name="Keywords" content=" your, keyword, list, here ">.

<meta name="Description" content=" Your Description Here. ">.

<meta name="MSSmartTagsPreventParsing" content="TRUE">.

</head>.

<body>.

Run the code through.

Http://validator.w3.org/.

To point out any coding errors and typos that you have missed...

Comment #4

Thanks a lot, PeterVazed and Giz!.

From Giz:.

Hi there Giz! Well, I used your code, but instead of giving me the format below,.

Name : XXXXXX.

Subject : XXXXXX.

E-mail : XXXXX.

It becomes.

Name : XXXXX Subject : XXXXXX E-mail : XXXXX.

Instead! That's why! So, I edited the code you gave me and hey! It works! Thanks!.

Actually, I use Microsoft Publisher 2000 to create my web pages and it uses HTML 2.0, it seems. But HTML 2.0 is more compatiable on older browsers, right?..

Comment #5

You didn't need to create 3 separate tables, just three rows within one table:.

<form action="whatever" method="whatever" etc="value">.

<table>.

<tr><td width="100">*Name:</td><td><input type="text" name="Name"></td></tr>.

<tr><td width="100">*Subject:</td><td><input type="text" name="Subject"></td></tr>.

<tr><td width="100">*E-mail:</td><td><input type="text" name="E-mail"></td></tr>.

</table>.

</form>..

Comment #6

Yeah, three separate rows inside just one table is what I intended and what I posted above..

I think he must have grabbed a copy of my message while I was still editing it, as I missed a tag out on my original posting, then corrected it soon after...

Comment #7

Sorry giz, I didn't see your post about the three rows...

Comment #8

Thanks a lot, Goldilocks and Giz!.

As for you, MorrowWasted...no no. The truth is : I joined this iPage site cos' it's very good and it's as good as CodeGuru, in terms of the response rate..

Having dirty ideas, pal?!..

Comment #9

I am just messin around (watch out for him GoldiLocks)..

I actually find the response rate to be slightly faster on here than on codeguru, but then again, you guys (except you Xeon) couldn't tell me how to fix this code:.

#include "stdafx.h".

#include "resource.h".

#define MAX_LOADSTRING 100.

// Global Variables:.

HINSTANCE hInst; // current instance.

TCHAR szTitle[MAX_LOADSTRING]; // The title bar text.

TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text.

// Foward declarations of functions included in this code module:.

ATOM MyRegisterClass(HINSTANCE hInstance);.

BOOL InitInstance(HINSTANCE, int);.

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);.

LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);.

Int APIENTRY WinMain(HINSTANCE hInstance,.

HINSTANCE hPrevInstance,.

LPSTR lpCmdLine,.

Int nCmdShow).

{.

// TODO: Place code here..

MSG msg;.

HACCEL hAccelTable;.

// Initialize global strings.

LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);.

LoadString(hInstance, IDC_TEST2, szWindowClass, MAX_LOADSTRING);.

MyRegisterClass(hInstance);.

// Perform application initialization:.

If (!InitInstance (hInstance, nCmdShow)).

{.

Return FALSE;.

}.

HAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_TEST2);.

// Main message loop:.

While (GetMessage(&msg, NULL, 0, 0)).

{.

If (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)).

{.

TranslateMessage(&msg);.

DispatchMessage(&msg);.

}.

}.

Return msg.wParam;.

}.

//.

// FUNCTION: MyRegisterClass().

//.

// PURPOSE: Registers the window class..

//.

// COMMENTS:.

//.

// This function and it's usage is only necessary if you want this code.

// to be compatible with Win32 systems prior to the 'RegisterClassEx'.

// function that was added to Windows 95. It is important to call this function.

// so that the application will get 'well formed' small icons associated.

// with it..

//.

ATOM MyRegisterClass(HINSTANCE hInstance).

{.

WNDCLASSEX wcex;.

Wcex.cbSize = sizeof(WNDCLASSEX);.

Wcex.style = CS_HREDRAW | CS_VREDRAW;.

Wcex.lpfnWndProc = (WNDPROC)WndProc;.

Wcex.cbClsExtra = 0;.

Wcex.cbWndExtra = 0;.

Wcex.hInstance = hInstance;.

Wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_TEST2);.

Wcex.hCursor = LoadCursor(NULL, IDC_ARROW);.

Wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);.

Wcex.lpszMenuName = (LPCSTR)IDC_TEST2;.

Wcex.lpszClassName = szWindowClass;.

Wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);.

Return RegisterClassEx(&wcex);.

}.

//.

// FUNCTION: InitInstance(HANDLE, int).

//.

// PURPOSE: Saves instance handle and creates main window.

//.

// COMMENTS:.

//.

// In this function, we save the instance handle in a global variable and.

// create and display the main program window..

//.

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow).

{.

HWND hWnd;.

HInst = hInstance; // Store instance handle in our global variable.

HWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,.

CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);.

If (!hWnd).

{.

Return FALSE;.

}.

ShowWindow(hWnd, nCmdShow);.

UpdateWindow(hWnd);.

Return TRUE;.

}.

//.

// FUNCTION: WndProc(HWND, unsigned, WORD, LONG).

//.

// PURPOSE: Processes messages for the main window..

//.

// WM_COMMAND - process the application menu.

// WM_PAINT - Paint the main window.

// WM_DESTROY - post a quit message and return.

//.

//.

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam).

{.

Int wmId, wmEvent;.

PAINTSTRUCT ps;.

HDC hdc;.

TCHAR szHello[MAX_LOADSTRING];.

LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);.

Switch (message).

{.

Case WM_COMMAND:.

WmId = LOWORD(wParam);.

WmEvent = HIWORD(wParam);.

// Parse the menu selections:.

Switch (wmId).

{.

Case IDM_about.

:.

DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);.

Break;.

Case IDM_EXIT:.

DestroyWindow(hWnd);.

Break;.

Default:.

Return DefWindowProc(hWnd, message, wParam, lParam);.

}.

Break;.

Case WM_PAINT:.

Hdc = BeginPaint(hWnd, &ps);.

// TODO: Add any drawing code here....

RECT rt;.

GetClientRect(hWnd, &rt);.

DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER);.

EndPaint(hWnd, &ps);.

Break;.

Case WM_DESTROY:.

PostQuitMessage(0);.

Break;.

Default:.

Return DefWindowProc(hWnd, message, wParam, lParam);.

}.

Return 0;.

}.

// Mesage handler for about box..

LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam).

{.

Switch (message).

{.

Case WM_INITDIALOG:.

Return TRUE;.

Case WM_COMMAND:.

If (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL).

{.

EndDialog(hDlg, LOWORD(wParam));.

Return TRUE;.

}.

Break;.

}.

Return FALSE;.

}.

Could you? btw there arent any problems, if you actually scanned it to try to figure it out!..

Comment #10

Wha! U're a nice cheeky li'l kid, MorrowWasted!.

Be careful you don't get banned here for your cheekiness!.

I've been banned for 3 times in Codeguru and the moderators have sent me lots of letters telling me to go on "vacation" and stay away from Codeguru...

Comment #11

Hi there again, folks! Below is my code, again:.

<! HTML Markup startspan >.

<form action="whatever" method="whatever" etc="value">.

<font face="Arial" size=10>.

<table><tr><td width="100">*Name:</td><td><input type="text" name="Name"></td></tr></table>.

<table><tr><td width="100">*Subject:</td><td><input type="text" name="Subject"></td></tr></table>.

<table><tr><td width="100">*E-mail:</td><td><input type="text" name="E-mail"></td></tr></table>.

</font>.

</form>.

As you can see above, there's this line :.

<font face="Arial" size=10>.

But it seems that this font is not applied to the table!(that is, everything within the <tables>-related tags).

How do I change the font of the text inside a table-formatted area?.

Please and thanks a lot! :-).

Xeon...

Comment #12

Let's try to solve this case: It looked too messy for me so here's the code for the whole page. You wanted to specify the font, that's sure possible, but the.

<font>.

Code must be between the.

<td>.

And.

</td>.

Codes..

Unfortunately, that's why you'd need to specify the font for each.

<td>.

Separately, so let's use a CSS code to make it easier. The CSS code must be inside the header...

Comment #13

Thanks a lot, Agent 2002!.

By the way, is there any minimum browser requirements in order for style sheets to work properly?.

Thanks again!.

Xeon...

Comment #14

"My name is 002, agent002. (not agent 2002)"....

Of the Internet Explorers, I think IE3 is the first one to handle some basic CSS, but only some simple codes (the CSS in the code I gave you should work fine in IE3). I don't know how old netscapes support CSS, but I think most of the people are using enough new browsers anyway...

Comment #15

Netscape 4 supports.

Some.

CSS, but not very well..

Stuff assigned to the.

Body.

Doesn't always get inherited properly...

Comment #16

Thanks a lot, Agent.

002.

And Giz!.

By the way, the current version of Netscape is 7.0+, rigth?..

Comment #17

The current is.

Netscape 7.01.

But also note that.

Mozilla.

And.

Phoenix.

Are based on the same code...

Comment #18

Basically dont try anything but arial, times, or... was it verdana? I forgot. only the basic fonts!..

Comment #19

Thanks a lot, Giz and Verdana! Err.....I mean, MorrowWasted...

Comment #20


This question was taken from a support group/message board and re-posted here so others can learn from it.