November 19, 200818 yr I want to acheive the following: So the image and text boxes are left and right aligned how do i acheive this in css ?? I guessing I need to use DIVS with IDS or classes. Cheers Lee
November 19, 200818 yr Hi, do this: <div id="container"> <div id="header"></div><!-- #header --> <div id="content"> <div class="image-text-combo-left"> <p><img /></p><p></p> </div> <div class="image-text-combo-right"> <p><img /></p><p></p> </div> </div><!-- #content --> <div id="footer"></div><!-- #footer --> </div><!-- #container --> and then float:left or float:right the images in the first paragraph of each div with the class "image-text-combo". e.g. div.image-text-combo-left p img {float:left;} and div.image-text-combo-right p img {float:right;}
November 20, 200818 yr I did what you said but the site is still in the center what now?? #container {width: XXXpx; margin: 0px auto;} This style will make your container stay centered. Just replace XXX with the actual width. Probably worth adding: #footer {clear: both;}
November 20, 200818 yr Also, you might want to add body { text-align: center; } as (correct me if I'm wrong), IE7 Doesn't like #container_name { margin: 0 auto; }
November 21, 200818 yr Also, you might want to add body { text-align: center; } as (correct me if I'm wrong), IE7 Doesn't like #container_name { margin: 0 auto; } Quite right Luke, IE doesn't like it. Piece of ****. lol
November 22, 200818 yr IE7 has no problem with it Sorry you're right. I'ts IE 6 and below that has problems with it.
Create an account or sign in to comment