CSS - Margin=0 And Yet Still There's Miles Of Space
It's probably something small, something stupid, but I can't seem to scoot the different entries closer to one another. http://projects.describe.org/esdcar/directors.html
http://projects.describe.org/esdcar/board.css with the relevant part being Code: .identitydir { margin: 0em; } .identitydir img { width: 100px; height: 100px; } .identitydir#top { margin-top: 1em; } .identitydir p { text-align: left; position: relative; top: -100px; left: 105px; width: 80%; } .identitydir h3 { text-align: left; position: relative; top: -100px; left: 105px; } I'm about ready to use a table instead. Similar TutorialsHeya guys, Hope someone can help me with this one. Been looking around the web but most are suggesting to do what i have already done. I've got this in style.css file: Code: /* SEARCH Bar */ .lb_bl {background: url(/img/lb_bl.gif) 0 100% no-repeat #E5ECEC} .lb_br {background: url(/img/lb_br.gif) 100% 100% no-repeat} .lb_tl {background: url(/img/lb_tl.gif) 0 0 no-repeat} .lb_tr {background: url(/img/lb_tr.gif) 100% 0 no-repeat; padding: 3px} .clear {font-size: 1px; height: 1px} .topform { position: absolute; right: 5px; top: 65px; width: 300px; font-size: 10px; font-family: myriad, verdana, sans-serif; text-align: right; } input, form { font-size: 11px; font-family: myriad, verdana, sans-serif; margin-bottom: 0px; margin: 0px; } /* End of SEARCH Bar */ Which refers to this part of my index.php page: Code: <!-- Top right SEARCH --> <div class="topform"> <div class="lb_bl"> <div class="lb_br"> <div class="lb_tl"> <div class="lb_tr"> <form name="form" id="form" method="post" action=""><input name="search" type="text" /> <input name="search" type="button" value="SEARCH" /></form> </div> </div> </div> </div> <div class="clear"> </div> </div> <!-- End of top right SEARCH --> But i am still getting a space below the form in IE (firefox is perfect). What should i do? You can see an example of the page at www.theresortwarehouse.com Thanks in advance to anyone who can help - Gaz I have a couple of divs at the very top of my page spanning the width of the page. In IE-8 the page is displayed as I would like, with no spacing at the top margin above the first div. In FF, there is a giant space about 50 px high. I need to get rid of this space. Below is my css for the top-most div, body, and the html... any ideas? Code: body { margin-top: 0px; font-family: Arial,Verdana,Helvetica; font-size: 12px; } div#top { margin-top: 0px; float: left; background-image: url(../img/logo.png); background-repeat: no-repeat; width: 100%; height: 42px; } <div id="top"></div> <div style="margin-bottom:40px"> <script type="text/javascript">javascript menu code</script> </div> Hi there, I'm building a page that requires 100% width & height, and absolutely NO margins on any side. I've applied the following inside my CSS: body { margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: 000000; } For this to work in Firefox, I've also had to add the same code just above the head tag (inconvenient, but I don't mind). My problem is the unwanted right margin that appears in IE. I have no idea how to remedy this. You may view the page here. Thanks so much! I normally don't use css outside of font formatting and one website I positioned with css (fixed width), but I'm integrating punbb with a website, and I'd like to stay with the css positioning. I'm trying to make 3 columns with margin space in between that add up to 100% width inside the page margins, and the columns should stay next to each other when the page is adjusted smaller, instead of falling beneath. I can get 3 columns, but they don't add up correctly to the fill width of the page (either wider or narrower, but never perfect), and they do the stacking, or falling beneath, even before the text in the columns get squished when I adjust the browser size. I'm a little better off if I try it outside of the punbb template, but its still wrong and has the same problems, just to a lesser degree. Does anyone know of a way to do this that doesn't rely on a complete template, so I can easily drop it into the punbb template? From what I've read, this looks to be quite a challenge with many hacks and such. As a css novice, would it be better to just complete this with tables? Here is where I'm going so far: Code: #oneBox { FLOAT: left; margin-bottom: 2px; PADDING-LEFT: 2px; PADDING-TOP: 1px; PADDING-BOTTOM: 1px; width: 33%; border: solid #000000 1px; BACKGROUND-COLOR: #2A3D5C; COLOR: #fff } #twoBox { FLOAT: left; margin-left: 1%; margin-right: 1%; margin-bottom: 2px; PADDING-LEFT: 5px; PADDING-TOP: 1px; PADDING-BOTTOM: 1px; width: 29%; border: solid #000000 1px; /*border-top: 0px; border-right: solid #000000 0px; border-left: solid #000000 0px; border-bottom: solid #000000 0px;*/ BACKGROUND-COLOR: #2A3D5C; COLOR: #fff; overflow: hide; } #threeBox { FLOAT: left; margin-left: 0px; margin-bottom: 2px; PADDING-LEFT: 5px; PADDING-TOP: 1px; PADDING-BOTTOM: 1px; width: 33%; border: solid #000000 1px; /*border-top: 0px; border-right: solid #000000 0px; border-left: solid #000000 0px; border-bottom: solid #000000 0px;*/ BACKGROUND-COLOR: #2A3D5C; COLOR: #FFF; } ...and the HTML Code: <div id="oneBox"> First thing </div> <div id="twoBox"> Second thing </div> <div id="threeBox"> Third thing </div> I know there are some odball things in there from trial and error, but it should be a good example of where I'm at. I do need to finish this soon, and I've spent all day trying to work these three columns, so if it's the opinion that I'd be better off with tables, I'm good with that too. Thanks up front for any replies! I've been looking through many, many forums trying to resolve this issue, so please forgive me if there is a solution to this that I've missed. Here's the deal: On some installs of Firefox (4.0), the body is being positioned 28px lower than the top of the screen. I set the <html> tag to have a light blue background to troubleshoot the issue, and now there is a light blue bar across the top of the page, proving that it is the body of the page that is lower than it should be. I thought it was a Firefox "collapsing margin" issue, so I added "margin:0; to almost everything, and it didn't help. I'm trying to do this without having to absolutely position everything. Here's the site: www-dot-myportlandtours-dot-com here's the css: www-dot-myportlandtours-dot-com/wp-content/themes/myportlandtours/style.css Anybody have insight into this? Background info: - I have validated the page and CSS, no problems there - Site is working properly in Firefox and IE, seems to be a margin issue in Safari -This margin issue is not the common Safari bug with a negative margin being applied to a floated element -I am using Safari in a windows environment, I do not have a Mac The problem: -in Safari the top margin on the content either is either not being applied at all or is being interpreted differently -it may be of note that I was having the same issue with IE, but was able to specify an IE specific style sheet for it, I don't believe this is possible in Safari? The website: http://www.lisa-noble.com/test/redo.html The HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Site Test</title> <link rel="stylesheet" type="text/css" href="redo.css" /> <!--[if IE]> <link rel="stylesheet" type="text/css" href="iespecific.css" /> <![endif]--> </head> <body> <div id="top_filler"> </div> <div id="left_filler"> </div> <div id="right_filler"> </div> <div id="top_left"> </div> <div id="header"> </div> <div id="top_right"> </div> <div id="content"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <p>Etc, etc, etc....</p> </div> <div id="bottom_filler"> </div> <div id="bottom_left"> </div> <div id="bottom_right"> </div> </body> </html> The CSS Code: * { margin: 0; padding: 0; } body { background: #fdd9e9; } div#top_filler { background: url(images/bg_slice_sm.png) repeat-x; width: 100%; height: 164px; position: fixed; top: 0px; z-index: 5; } div#left_filler { background: url(images/left_slice_sm.png) repeat-y; width: 174px; height: 100%; position:fixed; left:0px; z-index: 5; } div#right_filler { background: url(images/right_slice_sm.png) repeat-y; width: 161px; height: 100%; position:fixed; right: 0px; z-index:5; } div#bottom_filler { background: url(images/bottom_slice_sm.png) repeat-x; width: 100%; height: 76px; position: fixed; bottom: 0px; z-index: 5; } div#header { position: fixed; top: 0px; left: 37%; height: 125px; width: 316px; margin: 0 auto; background: url(pink_logo2.png) no-repeat; z-index: 25; } ul.NoBulletNoIndent { list-style-type: none; margin-left: 0px; padding-left: 0px } div#top_left { height: 314px; width: 221px; background: url(images/left_top_corner_sm.png) no-repeat; position: fixed; top: 0px; left: 0px; z-index: 5; } div#bottom_left { height: 175px; width: 176px; background: url(images/left_bottom_corner_sm.png) bottom no-repeat; position: fixed; bottom: 0px; left: 0px; z-index: 5; } div#top_right{ height:174px; width:174px; background: url(images/right_top_corner_sm.png) top no-repeat; position: fixed; top:0px; right: 0px; z-index:5 } div#bottom_right{ height: 602px; width:198px; background: url(images/right_bottom_corner2_sm.png) bottom no-repeat; position: fixed; bottom: 0px; right: 0px; z-index: 5 } div#content { margin: 40px 164px 0px 180px; position: relative; z-index: 1; } Hi! Should I do this? p { margin-top: 2em; margin-bottom: 2em; } or this: p { margin-bottom: 2em; } Same question for headers (h1, h2, etc) Thanks! Hi all Take a look at this in Firefox and then in IE7: http://www.josh.ch/files/temp/ie7_margin_bug/formulare.html The text input and the textarea fields have a strange margin on the left in IE7 that shouldn't be there. It seems to be "inherited" by the outher paragraph, just change the value in css/general.css on line 29 to see it happen. FF and IE6 behave well, IE7 doesn't. Interestingly, the select field (and all the other fields like radio buttons and checkboxes) don't have this problem. I did a search and found this link: http://www.positioniseverything.net/explorer/floatIndent.html Seems to be something like that, but the display:inline fix didn't help. the only way I see is a minus margin for the text input and textarea fields for IE7 only, but maybe there's a cleaner way? Thanks a lot for help :-) Josh Hi there, I have recently stumbled about a problem I had with another website I made as well, but since it was at the very bottom back then I kinda ignored it. My new website has this right in the header though, and so I decided to ask for help. Works perfectly in Gecko based browsers, though. I have the problem that I have to Div's right after each other which both have a top and bottom margin of zero, but there is a visible gap between them, only in IE though (header and content as well as content and footer) and in Opera 7.54 at the very bottom. The colors of the background PNG are also broken in IE, never mind that, will exchange that with a JPG. Website in question is http://cyxxon.com, WordPress with my own template. Had the same problem with a website completely handcoded by me. Any ideas? Thomas Hello, I am working on my website w w w . pujckyvcr . c z and there is problem with IE. Firefox is ok, in top menu, there is text with same margin from top and bottom. When you look on it in IE, text is 1px upper and text is more to up. Then hover isn't symmetrical from top and bottom in menu. Do you know how to fix thix IE bug? Thanks you, Jiri i am having a serious issue with ie 7 i really need help. i am using a center layout using 900px the center layout looks and works fine in all browsers except for ie7 i have used a border for the wrapper tag. what i have noticed only in the case of ie7 is the left border for the wrapper tag starts a few pixels 2px or 3px before compared to all other browsers and due to this in ie7 the right border ends a few pixels when compared to all other browsers. so if i can fix the left border the right border for the wrapper tag will adjust automatically. i am using a valid xhtml transitional document. following is my code. ------------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Background image</title> <style type="text/css"> body { text-align: center; margin: 0; font-family: Verdana; font-size: 10px; } #wrapper { width: 900px; text-align: left; margin: 0 auto; border: 1px solid #ffff00; } p{ margin: 0; padding: 0; } </style> </head> <body> <div id="wrapper"> <p>Content </p> </div></body></html> ------------------------------- can someone please tell me what the issue is and what the code should be. i would highly appreciate any help as this is an issue in ie7 and not in other browsers. thanks. Hi, Im creating a list that shows a photo and personal data of people. It's he http://tiregarfio.byethost17.com/web/frontend_dev.php/miembros username: fer password: m When i load it with IE6 i can see the list, but between the photos there are little space. I FF there isn't any space. Is that the bug of the "doubled margin" of IE6? Regards Javi I must be really dumb or blind here... For some reason i cant seem to get div.show_listing to actually move up. Sorry for my ignorance here in CSS, but i learn as i go. css Code: Original - css Code .container { display: block; margin-top: -32px; margin-left: 3px; width: 780px; overflow: hidden; border: 1px solid #cccccc; } /* Start Mac IE5 filter \*/ div.left_menu, div.show_listing { padding-bottom: 32767px !important; margin-bottom: -32767px !important; } /* End Mac IE5 Filter */ div.left_menu { margin-top: -32px; width: 150px; border-left: 1px solid #cccccc; height: 250px; background: #fbfbfb; border: 1px solid #cccccc; } div.show_listing { margin-top: -32px; margin-left: 155px; width: 620px; border: 1px solid #cccccc; }
html Code: Original - html Code <div class="container"> <div class="left_menu"> <div style="float: left;"> {link_one} </div> </div> <!-- This part is actually on a separate script.. it gets parsed via php --> <div class="show_listing"> <div style="float: left;"> -listing_text- fsdfsadf<br> </div> </div> </div> <div class="container"> <div class="left_menu"> <div style="float: left;"> {link_one} </div> </div> <!-- This part is actually on a separate script.. it gets parsed via php --> <div class="show_listing"> <div style="float: left;"> -listing_text- fsdfsadf<br> </div> </div> </div> Again sorry for my ignorance. ( just incase its viewable here ) Hi All, I am having a hard time aligning an element on my site. The problem is I am floating an element to the left and it wont cross all the way to the right, its like the margin to the right doesnt exist and the text goes to the next line when there is room (so it seems) to the right. Go to j4media.com to see what I mean...look in the sidebar and the problem is in the first bullet under the 'recent message board posts'. Here's the CSS: Code: .sidecnt { /* individual container in sidebar */ background: #040c0f url(jimg/sb_bg1.jpg) repeat-x; width: 245px; height: auto; border: 1px solid #000000; border-bottom: 6px solid #172e34; padding: 2px 2px 7px 2px; }.sidecnt h2 { /* container title image */ float: left; } .sidecnt h3 { /* container title */ float: right; color:#050608; font-family: Arial, Helvetica, sans-serif; font-weight:bold; font-size: 10px; }.sidecnt h4 { /* tag text */ float:left; margin: 25px -12px 2px 1px; /* top, right, bottom, left */ padding-bottom: 5px; font-family:Arial, Helvetica, sans-serif; } .sidecnt1 { /* individual container in sidebar - other than tag box */ background: #FFFFFF url(jimg/sb_bg1.jpg) repeat-x; width: 245px; height: auto; border: 1px solid #000000; border-bottom: 6px solid #172e34; padding: 2px 2px 7px 2px; }.sidecnt1 h2 { /* container title image */ float: left; } .sidecnt1 h3 { /* container title */ float: right; color:#050608; font-family: Arial, Helvetica, sans-serif; font-weight:bold; font-size: 10px; }.sidecnt1 h4 { /* text elements */ float:left; margin: 25px -12px 2px 1px; /* top, right, bottom, left */ padding-bottom: 5px; font-family:Arial, Helvetica, sans-serif; } .sidecnt1 ul { float:left; margin-top: 25px; /*top, right, bottom, left*/ padding-bottom: 1px; font-family:Arial, Helvetica, sans-serif; } and here's the HTML: Code: <div class="sidebar"> <div class="sidecnt"> <h2><img src="(URL address blocked: See forum rules)"></h2> <h3>j4media tags</h3> <h4> <?php UTW_ShowWeightedTagSetAlphabetical("coloredsizedtagcloud","",0) ?> </h4> </div> <br> <div class="sidecnt1"> <h2><img src="(URL address blocked: See forum rules)"></h2> <h3>Subscribe</h3> <div class="subscriberss"> <form name="subsform"> <a href="#"><img src="<? echo get_settings('home')."/wp-content/themes/i-feel-dirty/img/";?>feedicon.gif" alt="RSS" /></a> <a href="<? echo get_bloginfo('rss_url');?>" class="rsstext">RSS</a> <select name="aggs"> <option value="(URL address blocked: See forum rules)<? echo get_bloginfo('rss_url');?>">Bloglines</option> <option value="(URL address blocked: See forum rules)<? echo get_bloginfo('rss_url');?>">Feedness</option> <option value="(URL address blocked: See forum rules)=<? echo get_bloginfo('rss_url');?>">My Yahoo!</option> <option value="(URL address blocked: See forum rules)=rss&ut=<? echo get_bloginfo('rss_url');?>">My MSN</option> <option value="(URL address blocked: See forum rules)=<? echo get_bloginfo('rss_url');?>">NetVibes</option> <option value="(URL address blocked: See forum rules)=<? echo get_bloginfo('rss_url');?>">Newsgator</option> <option value="(URL address blocked: See forum rules)=<? echo get_bloginfo('rss_url');?>">Rezzibo</option> <option value="(URL address blocked: See forum rules)=<? echo get_bloginfo('rss_url');?>">Rojo</option> <option value="(URL address blocked: See forum rules)/faves?add=<? echo get_bloginfo('rss_url');?>">Technorati</option> </select> <a href="#" class="btnnofloat" onclick="window.location.href = document.subsform.aggs.options[document.subsform.aggs.selectedIndex].value;"><img src="<? echo get_settings('home')."/wp-content/themes/i-feel-dirty/img/";?>okbutton.gif" title="ok btn" alt="ok" /></a> </form> </div> </div> <div class="sidecnt1"> <h3>Recent Message Board Posts</h3> <ul> <?php if (function_exists('wpphpbb_topics')):?> <? wpphpbb_topics();?> <?php endif;?> </ul> </div> <div class="sidecnt1"> <h3>Categories</h3> <ul> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> </ul> </div> <div class="sidecnt1"> <?php /* If this is the frontpage */ if ( is_home() ) { ?> <?php if(get_links(-1,'', '','', false, 'name',false,false,-1, false, false)){ ?> <h3>Blogroll</h3> <ul><? get_links(-1,'<li>', '</li>','', false, 'name',false,false,-1, false, true); ?></ul> <? } ?> </div> <div class="sidecnt1"> <h3>Site Tools</h3> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <li><a href="(URL address blocked: See forum rules)" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li> <li><a href="(URL address blocked: See forum rules)/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li> <li><a href="(URL address blocked: See forum rules)/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li> <?php wp_meta(); ?> </ul> <?php } ?> </div> </div> <div class="clearfix"></div> <br></div> Thanks in advance for your help! Jrexi Having a weird effect in firefox in that it doesn't seem to respect the right margin correctly. What I am trying to do is line up text so that it flushes to an image that is to the right, but for some reason it pushes the image off the page. (floatWrap is a clearing div so <br style="clear: both"> is not needed) Code: Code: <div class="floatWrap"> <div style="float: right;"> <img src='imageSrc'> </div> <div id="txtWrap" style="float; left;"> <div class="floatWrap"> <div style="float; right;"> Some text which should be right up on the picture and to the left of the title </div> <div style="float; left;"> Title which will never reach the text next to the picture </div> </div> <div> Text that will reach the picture but for some reason pushes it out of the way instead of wrapping to the next line. </div> </div> </div> #txtWrap is the div that wraps the entire contents to the left of the image. I want this to flush all the way up to the image but give a buffer of 5px. I tried setting #txtWrap {width: 100%; margin-right: 5px;} but it pushes the pic off the screen. I am assuming this b/c a scroll bar at the bottom of the browser appears I tried setting #txtWrap {margin-right: 5px;} but the text within keeps pushing farther to the right than it's supposed to, causing the whole wrap to push the to the next line. Where can I set the margin-right property so it displays correctly? I cannot see a margin when I test this page in safari from dreamweaver. Basically I am trying for a centered container which will hold all the content and have some space from the top margin and be centered. With the CSS I have the container shows up with a margin when I test it in the firefox browser and even when using live view, but not in Safari. The latest version of Safari. What do I need to change to get the top margin to show correctly in Safari? Is something overriding something else? Code @charset "UTF-8"; /* CSS Document */ body { color: #000000; /*This sets all text to Black*/ /*background-color: #FFFFFF; /*This sets the bacground to white*/ margin: 100px auto; /*This sets the margin to zero*/ padding:0; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; text-align:center; } p { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; } h1 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000099; } h2 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000099; } h3 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000099; } .redtext { color: #FF0000; } a { color: #009900; } a:link { color: #000099; text-decoration: underline; } a:visited { color: #666666; text-decoration: none; } a:hover { text-decoration: none; background-color: #CCCCCC; } a:active { text-decoration: none; } .menu { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000; } .menu a:link { color: #336600; text-decoration: none; } .menu a:visited { color: #666666; text-decoration: none; } .menu a:hover { color: #990000; text-decoration: none; } .menu a:active { color: #666666; text-decoration: none; } div#container { width: 960px; height:760; /*margin-left:0 auto; /* the auto value on the sides, coupled with the width, centers the layout */ } div#outer { margin-left: auto; margin-right: auto; width: 960px; } div#header { position:relative; text-align: center; width: auto; } div#nav { width: auto; padding: 10px; margin-top: 1px; position:relative; } div#main { position:relative; width: auto; } div#footer { position:relative; width:auto; padding: 15px; margin: 0px; }#nav { position: relative; padding:20px; width: auto; } I've checked my site(www.lehsfair.org) in IE8 and FF and it works fine but in IE7/6 the red badge has a background and the bottom picture does not move down. What it supposed to do it does in IE8 and Firefox. In the left column, there should be a cow image and a pumpkin image with about 300px in between and a red star badge with a z-index that lets lay over the two images. Can anyone help me out with the IE7/6 issues?? Here's the code: Code: body {margin: auto; background: url(../images/bg.png) left top repeat-x; background-color:#808080;} #container{width: 1000px; margin: auto; border: 2px solid #000000; background-color:#FFFFFF; position:relative;} #header{width: 1000px; height: 200px; background: url(../images/header.png) left top no-repeat; float: left;} #content {width: 1000px; background-color: #ffffff; overflow:hidden; margin-bottom: 35px;} #col1 {width: 480px; float: left; overflow: hidden;} .ticket-box {width: 460px; background-color: #808080; margin-left: 20px; margin-top: 20px; margin-bottom: 10px; padding-bottom: 2px;} .ticket-box h1{text-transform: uppercase; color:#FFFFFF; font-family: Arial, Helvetica, sans-serif; font-size: 22px; text-align:center; padding-top: 10px; } h2 {color: #7f0000; text-align:center; padding: 5px; font-family: Arial, Helvetica, sans-serif; font-size: 18px;} .box-content{background-color:#FFFFFF; margin: 10px auto; width: 450px; border: solid 1px #000000;} .box-content p {color: #000000; font-size: 18px; font-family:Arial, Helvetica, sans-serif; padding: 10px 5px; line-height: 22px; } .location {margin: 5px 20px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; color: #000000; line-height: 22px;} .bullets {background: url(../images/text-bullets.png) no-repeat; width: 335px; height: 175px; margin: auto; margin-top: 40px; } #col2 {width: 480px; float: right; overflow: hidden; position:relative;} #cow-image {background: url(../images/cow.png) no-repeat; width:457px; height: 326px; margin-top: 20px;} #star-image {background: url(../images/star.png) no-repeat; width:376px; height: 369px; position: absolute; left: 50px; top: 300px; z-index: 1;} #pumpkin-image {background: url(../images/pumpkins.png) no-repeat; width:457px; height: 345px; margin-top: 300px; position:relative;} PHP Code: body { margin: 0px; font-family: Tahoma; font-size: 10px; background-color: #777; } #bodywrapper { margin-left: auto; margin-right: auto; width: 750px; background-color: #FFF; } #logo { margin-left: 15px; margin-top: 7px; margin-bottom: 7px; } .image { display: block; } .topnav { float: right; margin-top: 25px; background-image: url( images/line.gif ); } #left { float: left; width: 180px; background-color: #ccc; } #right { float: right; width: 180px; background-color: #ccc; } #center { margin-left: 190px; margin-right: 190px; background-color: #ccc; } #clear { clear: both; } #contentwrapper { margin: 0px; } PHP Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Language" content="en-us" /> <link href="/css/layout.css" type="text/css" rel="stylesheet" media="all" /> <title>Petroleum Listing Service</title> </head> <body> <div id="bodywrapper"> <div id="header"> <div class="topnav"> image image image </div> <div id="logo"> <img class="image" src="images/logo.gif" /> </div> </div> <div id="contentwrapper"> <div id="left"> left </div> <div id="right"> right </div> <div id="center"> center </div> <div id="clear"></div> </div> <div id="footer"> </div> </div> </body> </html> The problem I am having is it seems that FF starts rendering the white background only once the image is placed...it doesn't count the margin above it as content I assume... IE however does what I want it to do...renders the margin above the image as content, and thus the white background starts at the very top of the page, thus a white margin between the top of the page and the logo. How do I rectify the problem? I understand that FF is probably doing it right...but how do I make FF also start the white background at the top. Hi. Can anyone tell me why Internet Explorer doubles the margin width on the left side in this example? http://www.dirtybbq.com/test/ This works fine in FireFox. Thanks for your help. Here is my style sheet... Code: body { background-color: #E0E0E0; text-align: center; } p, input, select, th, td, h1, h2, textarea { font-family: verdana; font-size: 11px; } #container { border: 1px solid #000000; background-color: #FFFFFF; background-image: url('../images/bg.gif'); background-position: right; background-repeat: repeat-y; border: 1px solid #666666; margin-left: auto; margin-right: auto; width: 641px; } #header { background-color: #666666; background-image: url('../images/hd.gif'); background-position: bottom left; background-repeat: no-repeat; height: 64px; width: 641px; } #footer { background-color: #666666; padding-bottom: 0px; text-align: left; width: 641px; } #footer p { color: #FFCC00; font-size: 10px; margin: 0px; padding: 4px; } #footer a { color: #FFCC00; font-weight: bold; text-decoration: none; } #footer a:hover { text-decoration: underline; } #left { background-color: #FF6600; float: left; margin: 10px; margin-right: 11px; text-align: left; width: 400px; } #side_bar { background-color: #FFFF00; float: right; text-align: left; width: 220px; } |