I’m trying to layout a report using a CSS layout that I had previously done with a table. I can get everything looking right in IE, but not Firefox (go figure).
It has nested divs and everything lines up correctly unless the label block overflows into multiple lines. The last response in the second column is incorrectly lined up under the previous response instead of it’s associated label.
You need to post a link to your site. It would help us out if we could see the html code of your site as well as a visual of the problem.
HTML code is right there..
Well, obviously the last line is wrongly aligned because it is the only one that has question on multiple lines. So what you would have to do is make the answer to be on multiple lines also, simply add two <br/> tags in front of your last question and it will be fixed.
EDIT: Agh, or not.. this messes it up in IE. I hate all the differences in browsers. Couldn’t they just leave the language as it is and make it work the same everywhere? Well, in this case I would just use tables, or if I really wanted to use divs then make different div for every question and answer, But that is probably the most noobish solution. Probably because I am one in CSS..
There is an argument for this being tabular data. I don’t advocate the use of tables often – but sometimes there’s content that suits exactly what tables were designed for.
Endeavour to use standards compliant tables and only for the data in div.left and not for the page layout as a whole. Also, use the caption tag and a proper thead/tbody structure… and enjoy :)
on a side note – p is a block level element naturally so need not be declared each time.