I’m trying to convert a form from table to css However, one column contains text and the other got input boxes. The problem is that the vertical height of each is not the same so they don’t line up (vertically). How to I fix that?
@ray326Dec 04.2006 — #That defeats the whole point of the divs.[/QUOTE]That makes no sense to me. With row divs I lose the alignment which I had with tables.[/QUOTE]Are you talking about columnar alignment now? That's simply label/element styling.
@ray326Dec 05.2006 — #No no no. The markup is still very wrong. One label per input and just make the '*' part of the label string. Also, no font tags. Use a style to make the "*" (the first letter) red.
@ray326Dec 05.2006 — #Bingo. And if IE wasn't crap you could actually add the "*" with a style. In fact, what I do is define a .required class and do the first letter red with that. This is one place where you can't really separate the presentation and content thanks to Microsoft.
@ray326Dec 05.2006 — #The trouble you're having is exactly why I prefer the div/label/input pattern I use. Then this kind of styling starts putting things in the right place for you.
@yitzleauthorDec 05.2006 — #I'll rewrite in div/label/input
With the display:block I get the first-letter working and the inputs aligned. But it forces a newline between the label and input. With display:inline I do not get the firstletter color and the width is not uniform (ie the inputs don't line up)
@ray326Dec 05.2006 — #Inlines cannot have width. If you float the label the input should follow it on the line as long as the screen is wide enough. Wrapping the line in a div allows you to set the width of the div such that wrapping never occurs.