CSS Floating Div problem
-
Hi all,
I know this is basic but it’s not working for me (I have done this in the past with no problem) What I am trying to do is, on the front page of my test site, float two divs. On one side I will have a picture and on the other I will have a description. Then below this have another set of floated divs only this time the picture will be on the opposite side as the one above it (e.g, first row picture on left discription on right, second row description on left and picture on right). I will have about 6 rows of these floated divs (I am trying to not use a table). For some reason my picture and description are not staying on the same line. Or when I get them on the same line, the border I have set between them does not show. I don’t know if I have looked at it so long that I am just overlooking something basic. Heres a link to my test site my code I am using to float divs is as follows.pdiv { clear:both; } .left_1 { float: left; } .right_1 { float: right; border-left-width:thin!important; border-left-style:solid !important; border-left-color:#2d4262 !important; padding-left: 6px !important; margin-left: 6px; } .left_2 { float: left; border-right-width:thin!important; border-right-style:solid !important; border-right-color:#2d4262 !important; padding-right: 6px !important; margin-right: 6px; } .right_2 { float: right; padding-left: 6px; }
Thanks!
- The topic ‘CSS Floating Div problem’ is closed to new replies.