2 Column Div Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mxmissile
    New Member
    • Mar 2008
    • 3

    2 Column Div Help

    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?
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    On the bottom one, you have margin-left set. This is what blocks the text in the left column from rising up into place.

    Comment

    • mxmissile
      New Member
      • Mar 2008
      • 3

      #3
      Originally posted by drhowarddrfine
      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.

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        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.

        Comment

        • mxmissile
          New Member
          • Mar 2008
          • 3

          #5
          Thank you! Now working as expected.

          Comment

          Working...