By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,739 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,739 IT Pros & Developers. It's quick & easy.

2 Column Div Help

P: 3
I have a two column layout I'm playing around with but its giving me a headache. See link..

Both divs contain basically the same markup, how can I get the vertical text alignment to match? Why are they not the same height?

The bottom example I am specifying height, but the vertical text alignment is wonky.

What am I doing wrong? Is there a better way to approach this and still keep the columns fluid?
Mar 3 '08 #1
Share this Question
Share on Google+
4 Replies


drhowarddrfine
Expert 5K+
P: 7,435
On the bottom one, you have margin-left set. This is what blocks the text in the left column from rising up into place.
Mar 3 '08 #2

P: 3
On the bottom one, you have margin-left set. This is what blocks the text in the left column from rising up into place.
So removing the right div (with margin-left set), the text in the left column should rise? It's not. See link , last example. What am I doing wrong here? I must be missing something really trivial.

On another unfortunate note, its somewhat behaving as expected in IE7. But not FF.
Mar 3 '08 #3

drhowarddrfine
Expert 5K+
P: 7,435
No. I said the margin was getting in the way. For example, remove the margin and set the div to float right and the text is in line.
On another unfortunate note, its somewhat behaving as expected in IE7. But not FF.
So you conform to a bug. Means nothing except IE is mishandling it as usual. I didn't look again but IE mishandles floats so that may be why it's doing what you want but not what you wrote.

But anyway, just set the <h2> to float right to fix that problem.
Mar 3 '08 #4

P: 3
Thank you! Now working as expected.
Mar 3 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.