CSS - Strange Margin Behavior In Ie...
Well strange on IE 5.2 for mac (I am assuming others are ficked too)
I have a div in which I want to put paragraphs in... Code: <html> <head> <style type="text/css"> #midRight { position:relative; top:20px; left:160px; width:550px; padding:0px; margin:0px; border:1px solid black; } </style> </head> <body> <div id="midRight"> <p>line1</p> <p>line2</p> <p>line3</p> <p>line4</p> <p>line5</p> </div> </body> </html> Everything works fine on firefox (as one would expect) but on IE the first paragraph displays fine (at the left edge of the DIV) but all the rest indent themselves to the right by 160px (or whatever I change the left:xx px; of the div to. This is bizzare! I cant work out why the first one would be fine but all the rest indented. Anybody know how I can fix this? (so IE looks like this) Code: line 1 line2 line3 line4 line5 etc Similar TutorialsHello there. I'm afraid I can't provide a live example because it's a complicated commission that hasn't yet been published, but I'll try to be as specific and detailed as possible. My overall aim: To have a squarish div on the left hand side and a few short rectangular divs vertically stacked on the right hand side of a container. The container is a div whose width is known. The stacked rectangles must have a minimum width but there is some margin for error. All these divs are separated by margins. Code: OOOO === OOOO OOOO === OOOO OOOO === There are other, unrelated blocks above and below this arrangement, and there are blocks nested within these divs as well, all unrelated though. So how did I implement this? I figured this was simple enough: Code: <div> ... <div class="left-square">...</div> <div class="right-short-rectangle">...</div> <div class="right-short-rectangle">...</div> <div class="right-short-rectangle">...</div> ... </div> And the CSS would then look something like this: Code: .left-square { width: 100px; height: ...px; float: left; } .right-short-rectangle { margin-left: 110px; margin-bottom: 5px; height: ...px; } So, this works just fine in Firefox and Internet Explorer. However, for some reason, Chrome doesn't like it. What Chrome does is, it completely ignores the margin on the right-short-rectangles, placing them underneath the floating left-square, but giving them the correct width (the width of the container minus the margin). By fooling around with the DOM inspector, I discovered that if I remove the margin attribute from one of the rectangles, they show correctly (in Chrome). However, they obviously will break in Firefox and Internet Explorer if I do that. Also, if I remove the float attribute from the square, Chrome suddenly recognizes the margins of the rectangles properly (when it no longer matters). So, does anyone have any idea about what's going on here? EDIT: I just noticed this and it is certainly relevant: The right-short-rectangles contain a few *unstyled* divs and one div that is floated to the RIGHT (in other words, content I want to have on the right hand side of each of these rectangles). Without this inner, right-floated div, the margin issue no longer happens in Chrome. The inner div is, however, essential. What can I do? Use tables? Hi. I have noticed a strange behavior with my CSS and I cannot figure out a way to fix it. I have some css to override the body tag style. It sets the font family and size. I need to do this. However, when I use the font-size in the body, it adds extra pixels to a set of span tags that I use. (see attached picture). Here is my code. Does anyone know how I can include the font-size in the body, but not have that extra space in my div tags? Note: the sample image contains images on the edge of the tabs, but their presence has no effect on the issue. Also, this is for IE 6 on Windows. Thanks, Dave Code: <html> <head> <style> body { font-family: Tahoma,Verdana,Arial,sans-serif; font-size:11px; /* with this line, extra space appears */ } .tab_off { height:17px; overflow:hidden; cursor:hand; } .tab_off_text { background:#ACA899; height:15px; font-size:10px; border-top:1px solid #aaaaaa; border-bottom:1px solid #ECECEC; padding-left:4px; padding-right:4px; vertical-align:middle; } .tabbed_panel { background:#ECE9D8; border-left:1px solid #666666; border-bottom:1px solid #666666; border-right:1px solid #666666; width:400px; height:400px; } </style> </head> <body> <div id="pnlTabs"> <span class="tab_off"> <span class="tab_off_text">Tab One</span> </span> </div> <div id="pnlContent" class="tabbed_panel"></div> </body> </html> I'm currently working on the CSS template for a new client and running into a strange issue. The design calls for a separation bar of repeated background to resemble a negative strip (site is a portfolio piece for a commercial photographer), and below that the continuation of a gradation. For some reason, however, in Mozilla-based browsers a gap (visually as if it was a top margin) is appearing in the background repeat (gradation) in the pageblock. To see it, visit http://www.spearsphotography.com/test_index.html in Firefox or another Moz browser. The strange thing is... I noticed the contained news items were not being pushed down (that is to say, it wasn't a margin issue). I tried changing the CSS definition of the background image position on the div, etc. Finally to see exactly where the browser was drawing the div, I set a 1px green border on #pageblock. Oddly enough it fixed it! (weird, huh?) This is especially strange since the float: right; div with the splash image -is- affected by the mysterious "margin". You can see that by going to http://www.spearsphotography.com/test_index2.html. (Contains an inline style to add the border to #pageblock The css file is at http://www.spearsphotography.com/css/style.css I just don't get it. This was all coming together so quickly from the Photoshop mockups, and now a brick wall that is driving me mad. I have a very strange quirk going on with my development site right now. It's being developed locally so I can't provide a link to test with. However, I can describe the exact behavior. When any browser is maximized, everything looks great. If you size the browser, dragging any corner in any direction, again, the site looks great. However if you hit the restore down button on any browser, the following occurs: (Example) Browser max is 1900 x 1080. Browser 'restore down' is 1024x768. When hitting restore down the site looks fine at first glance. However, if you drag the horizontal scroll bar down at the bottom of the browser to the right, a large white gap appears in place of the header, the menu, the body, the footer where the background should be. (On the links below you will need to add an h t t p : / / to see the image issues I'm having. For some reason, I can't post any and it's really the only way I can show how this issue is occurring. Here is what it looks like before dragging horizontal bar: img21.imageshack.us/img21/2602/beforedrag.jpg Here is the strange gap pictu img31.imageshack.us/img31/6199/strangegap.jpg Again, if I grab the corner of the browser itself and drag diagonally and resize, the background fills and stretches exactly the way it should. Anyone have an idea of what might be causing it? I'm using a div container as a wrapper: div#container { text-align: center; margin: 0 auto; } Header contains a flash file. Menu contains: background-image: url(/images/menu-background.gif); background-repeat: repeat-x; My main nav content is in a smaller container: #nav-main { position:inherit; white-space:nowrap; width:913px!important; font-family:helvetica, sans-serif; margin: auto auto!important; } Any ideas for what I need to do to fix this? Many thanks. Hi. I have a nav bar on my site which I created using Suckerfish Dropdowns. my <UL>-s id is "nav". Everything is working when I hide secong level list by Css: Code: ul ul{display:none;} But when I change it to (so as to not hide all second level lists) Code: ul#nav ul{display:none;} , the browser still hides the list, but didn't show it on hover! : Code: li:hover ul, li.sfhover ul{ display: block; } This behaviour seems very strange for me. Can anyone explain me that? The address of the page is http://www.dinal.ru/new/ Thank you. Artashes Hi there. I have a blank space that appears as a link when my animated T-R MENU button is clicked. Click here to view the problem It didn't do this in the last version of FF... I can't see why it's doing it, there aren't blank spaces in the code to make it behave this way. Opera, Safari and IE view it fine. Just FF3 that's doing it. Can anyone shed some light on why it's doing this or how to fix it? Thanks in advance. This pertains to the "last nail in the coffin" so to speak in cross-browser compatability with the template for this site. The template is at http://www.spearsphotography.com/test_index.html The effect in question is on paragraph tags in the news item elements under the pagebody id div. (e.g., #pageblock div.story p ). Essentially, in every browser -except- IE Windows, the line spacing is as intended by the design. In IE6Win (haven't tested 5, but assume same) the lines are too-tight. Can anyone see the problem here, or has experienced this before? CSS File is at: http://www.spearsphotography.com/css/style.css Thanks. I have a big div container. In this container, I put my content - mostly text. I have a nested div in this container that floats a "sidebar" to the upper-left corner of the container. The sidebar is set up to allow text in the container to fill in around the bottom half of the side bar if the sidebar is shorter than the length of the container. My problem occurs when I have an unordered list as part of my content. If I have an unordered list sitting to the right of the sidebar, the bullets of the list sit immidiately on the right the left of the sidebar (with no indenting). Below the sidebar, all bulleted lists starts indenting from the left of the container, as expected. One solution would be to put my content in it's own div, that would be completely separate from the sidebar div. However, if I do this, my content won't fill in around the bottom of my sidebar. Any advice? Thanks! - Ryan I haven't seen this one before. And I can't for the life of me figure out what could be causing this. Take a look at This Page To see what I'm talking about, you'll need to view it in a good browser first (Mozilla, Netscape, Opera) Then look in IE. Basically there's an H3 that also serves as a link to my RSS Feed page. You don't see it in IE unless you actually hover the mouse over it. Even then, if you move the mouse over the menu on the left, the heading disapears again. At first I thought it could be because it was a heading, but on another page a regular link does it too. I've got two stylesheets, and it does it on both. Any thoughts or suggestions? Here's the main stylesheet Hi all, I'm building my first experimental CSS site, and I'm trying to attain accessibility for the widest array of users. While testing various browser settings, I came across this issue. (I'm looking at the site in IE, as I'm at work. I'll be able to look it over in other browsers when I get home.) When my site is viewed with text set to "Medium," everything appears fine: http://www.flickr.com/photos/251449...in/photostream/ When my site is viewed with text set to "Larger," the text in the middle left section doesn't fit: http://www.flickr.com/photos/251449...in/photostream/ Fair enough. But here's what has me stumped: when the site is viewed with the text set to "Largest," it fits again: http://www.flickr.com/photos/25144998@N00/4997174984/ I've learned alot very quickly in the last week or so, but this really has me over a barrel. Any ideas? CSS Code: body { background-color: #393939; font-family: sans-serif; font-size: 100%; margin: 0; padding: 0; } .header { text-align: right; font-weight: bold; font-size: 1.6em; } .clickables { text-align: right; font-weight: bold; font-size: 0.95em; } .content { text-align: right; font-size: .8em; } .navbutton { float: right; width: 5em; background-color: #ffcc00; color: #666666; height: 1em; text-align: right; font-weight: bold; font-size: 0.95em; margin: .75em 0.2em .75em 0em; } #mother { margin-left: auto; margin-right: auto; min-width: 720px; max-width: 1000px; width:expression(document.body.clientWidth > 1000? "1000px": "auto" ); width:expression(document.body.clientWidth < 500? "500px": "auto" ); } #UpperLeftWrapper { float: left; width: 35%; background-color: #7d7d7d; } #UpperLeft { height: 8em; margin: 0; background-color: #7d7d7d; } #UpperRightWrapper { float: right; width: 65%; background-color: #666666; } #UpperRight { float: right; width: 7em; height: 7em; margin: 0; padding: .5em; background-color: #666666; color: #ffcc00; } #MiddleLeftWrapper { float: left; width: 35%; background-color: #ffd426; } #MiddleLeft { float: right; width: 8em; height: 1.2em; color: #7d7d7d; background-color: #ffd426; margin: 0; padding: 0.6em; } #MiddleRightWrapper { float: left; width: 65%; background-color: #ffcc00; } #MiddleRight { float: right; width: 24.85em; height: 2.45em; background-color: #ffcc00; margin: 0em .6em 0em 0em; } #LowerLeftWrapper { float: left; width: 35%; background-color: #e5e5e5; } #LowerLeft { float: right; width: 5.8em; height: 75em; color: #7d7d7d; background-color: #e5e5e5; padding: 0.7em; } #LowerRightWrapper { float: left; width: 65%; background-color: #ffffff; } #LowerRight { float: right; height: 88em; color: #666666; background-color: #ffffff; padding: 0.8em 1.1em 2em 2em; } HTML Code: <!DOCTYPE html> <HTML> <HEAD> <META CHARSET="UTF-8"> <title>layout three</title> <link rel="stylesheet" type="text/css" href="comp.css" /> </HEAD> <BODY> <div id="mother"> <div id="UpperLeftWrapper"> <div id="UpperLeft" class="header"> </div> </div> <div id="UpperRightWrapper"> <div id="UpperRight" class="header"> <p>demonstration<br>layout<br>number two</p> </div> </div> <div id="MiddleLeftWrapper"> <div id="MiddleLeft"> <div class="clickables"> <p>additional reading</p> </div> </div> </div> <div id="MiddleRightWrapper"> <div id="MiddleRight"> <div class="navbutton"> <p>tab one</p> </div> <div class="navbutton"> <p>tab two</p> </div> <div class="navbutton"> <p>tab three</p> </div> <div class="navbutton"> <p>tab four</p> </div> <div class="navbutton"> <p>tab five</p> </div> </div> </div> <div id="LowerLeftWrapper"> <div id="LowerLeft" class="clickables"> <p> first link<br> second link<br> third link<br> fourth link<br> fifth link<br> sixth link<br> seventh link<br> eighth link<br> </p> </div> </div> <div id="LowerRightWrapper"> <div id="LowerRight" class="content"> <p> Body content here... </p> </div> </div> </div> </BODY> </HTML> Thanks in advance for any advice! Hello, I am having an issue with some background images. Ive finally decided on a method to create my rounded corners. I am using three divs, a top bottom and center content div. The top and bottom divs have a background image for the top and bottom portions of the curved box. The center div contains the content and a background image repeating along the x-axis. Problem is, the image repeating stops just shy of the top and bottom images. Is there a way to solve this? When I place a border around the center div, the repeating image portion suddenly fills in the gaps, which I don't quite understand. Here is a link to a development area where I am displaying the problem: http://www.ioforge.com/ezt-example/index.html Hello to all, I have a problem of compatibility when using Safari (V3). I have a strange interface and i can't identify the problem. When I refresh my page,I don't have the same css !!!! The same interface is testing wit hFirefox and IE and it's ok. Can you help me please. Thank you in advance for your time. I have two column divs in my main div. They have the same margin setting but the second one mainright seems to be ignoring it... and both have width tags (that's doing something). (URL address blocked: See forum rules) and (URL address blocked: See forum rules) my wrapper has a min-width of 780px Is it margin doubling? when i took the border and margin out of the mainleft div, it slammed to the wall of the container div. is there a hack for this? i want my 2 columns to have identical alignment... Code: #left { float:left; width:230px; text-align:left; font-size: 12px; border:1px solid red; } #left p {/* margin:10px;*/ padding:0;} #main { position:relative;margin-right:100px; text-align:left; } #main h1,h2,h3,h4 {margin:0; padding:0; display:inline;} #main p {margin:5px; padding-left:5px;} #mainleft { margin:5px; float:left; width:250px; border:1px solid red; text-align:left; } #mainright { margin:5px; padding:5px; /**/ position:relative; /* float:right; only made it float right but still below the left */ text-align:left; margin-left:490px; width:250px; border:1px solid red; } /******* THE HTML *********/ <div id="left"> <div class="prop"></div> <!-- the old createnavbar could go here or a photo --> <?php include 'leftcol.php' ?> <div class="clear"></div> </div><!-- left --> <div id="main"> <div id="mainleft"> <h4>News</h4><br /> <p>copy.......</p> </div><!-- mainleft --> <div id="mainright"> <h4>Features</h4><br /> Many are free; Some have value.<p> </p> <ul> <li>bunch of stufff</li> </ul> </div><!-- mainright --> </div><!-- main --> I have a strange css bug in IE 6 and 7 while making a simple two column structure. In firefox both the left and the right columns are top aligned properly but in IE the right column has around 15px of space on top of it. I can't seem to figure out why this space is coming. This seems like the IE peekaboo bug but can't be fixed using the line-height hack. Instead giving the IE proprietary ZOOM property to the UL we can fix this bug in IE. But I want to know is there any other method to fix this issue which uses valid css. Doctype for the HTML is xHTML transitional Here is the css code. #gdsrView{width:456px;} #gdsrView .srchGrpMod{} #gdsrView .grpResHdr{} #gdsrView .grpPagination{} #gdsrView .srCnt{clear:both;float:none;} #gdsrView .srCnt ul{list-style-type:none;margin:0;padding:0;} #gdsrView .srCnt ul#lstView li{clear:both;float:none;border-bottom:1px solid green;padding-bottom:5px;} #gdsrView .srCnt ul#lstView .grpPic{width:75px;height:75px;overflow:hidden;float:left;} #gdsrView .srCnt ul#lstView .grpInfo{background:#cacaca;margin-left:83px;} #gdsrView .srCnt ul#lstView dl.grpMLnk{font-size:1.1em;} #gdsrView .srCnt ul#lstView .grpInfo dl.grpMLnk dt{display:inline;} #gdsrView .srCnt ul#lstView .grpInfo dl.grpMLnk dt a.actLnk{font-size:0.8em;} #gdsrView .srCnt ul#lstView .grpInfo .grpDes{font-size:1em;} #gdsrView .srCnt ul#lstView .grpInfo .tStamp{font-size:0.9em;} #gdsrView .clearFl{margin-top:1px;} HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "(URL address blocked: See forum rules)"> <head> <title>IE bug</title> </head> <body> <div id="gdsrView"> <div class="srchGrpMod"></div> <div class="grpResHdr"></div> <div class="grpPagination"></div> <!-- Begin: group results list view --> <div class="srCnt"> <ul id="lstView"> <li style="background:red;zoom:100%;"> <div class="grpPic"> <img src="../images/pic.jpg" alt="Group Image" width="75" height="75" /> </div> <div class="grpInfo"> <dl class="grpMLnk"> <dt><a href="#">Lorem Ipsum dolor amet consectectuer...</a></dt> <dt><a class="actLnk" href="#">Request Invitation</a></dt> </dl> <p class="grpDes">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Donec mattis urna eget magna. Nam cursus ipsum sit amet.lorem. Vestibulum ante ipsum primis in faucibus orci luc..</p> <p class="tStamp">Updated 55 Minutes ago</p> </div> <div class="clearFl"></div> </li> </ul> </div> <!-- End: group results list view --> </div> </body> Weird issue with FF ive noticed can anyone explain why this happens? I have two divs, header and nav. Nav is inside header. Now when I placed a list inside nav it pushed my header div down abit maybe 15px. However when I added the following rule... Code: #nav ul{ margin-top:0px; } The error goes away. Strange isnt it? Heres my html and css 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>Untitled Document</title> <link href="css/css.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="vwd_scripts/curvy/vwd_curvycorners.js"></script> <script type="text/javascript"> <!-- gCurvyCorners[0]="nav,5,5,false,false,0,0"; //--> </script> </head> <body> <div id="header"> <div id="nav"> <ul> <li>Home</li> <li>Browse</li> </ul> </div> </div> <div id="content"> <h1 id="mainheader">Latest Templates</h1> <h1 class="sideheader">List One Title</h1> <h1 id="latesttemplates">Heres the latest templates</h1> <ul class="sidebarlist"> <li>list one</li> <li>list two</li> <li>list three</li> <li>list four</li> <li>list five</li> </ul> <h1 class="sideheader" style="top:150px">List One Title</h1> <ul class="sidebarlist" style="top:175px;"> <li>list one</li> <li>list two</li> <li>list three</li> <li>list four</li> <li>list five</li> </ul> <div id="templateholder" class="toprow" style="left:20px;"></div> <div id="templatedescript" class="descriptoprow" style="left:20px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template1name</td> </tr> <tr> <td class="descrip">Added</td> <td class="answer">template1date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template1type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template1images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="toprow" style="left:185px;"></div> <div id="templatedescript" class="descriptoprow" style="left:185px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template2name</td> <tr> <td class="descrip">Added</td> <td class="answer">template2date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template2type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template2images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="toprow" style="left:350px;"></div> <div id="templatedescript" class="descriptoprow" style="left:350px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template3name</td> <tr> <td class="descrip">Added</td> <td class="answer">template3date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template3type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template3images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="toprow" style="left:515px;"></div> <div id="templatedescript" class="descriptoprow" style="left:515px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template4name</td> <tr> <td class="descrip">Added</td> <td class="answer">template4date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template4type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template4images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="bottomrow" style="left:20px;"></div> <div id="templatedescript" class="descripbtmrow" style="left:20px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template5name</td> <tr> <td class="descrip">Added</td> <td class="answer">template5date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template5type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template5images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="bottomrow" style="left:185px;"></div> <div id="templatedescript" class="descripbtmrow" style="left:185px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template6name</td> <tr> <td class="descrip">Added</td> <td class="answer">template6date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template6type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template6images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="bottomrow" style="left:350px;"></div> <div id="templatedescript" class="descripbtmrow" style="left:350px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template7name</td> <tr> <td class="descrip">Added</td> <td class="answer">template7date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template7type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template7images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="bottomrow" style="left:515px;"></div> <div id="templatedescript" class="descripbtmrow" style="left:515px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template8name</td> <tr> <td class="descrip">Added</td> <td class="answer">template8date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template8type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template8images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> </div> </body> </html> Code: @charset "utf-8"; /* CSS Document */ body{ margin:0px; } #nav{ position:relative; height:35px; background-color:#3d3d66; width:405px; left:55%; top:65px; } #nav li{ display:inline; color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:16px; font-weight:bold; margin-right:10px; } #nav ul{ margin-top:0px; padding-top:8px; } #header{ height:100px; background-color:#333333; background-image: url(../images/jpegs/header.jpg); background-repeat:repeat-x; } #content{ position:relative; margin-top:50px; margin-left:auto; margin-right:auto; height:500px; width:974px } h1#mainheader{ margin-top:0px; padding-bottom:2px; border-bottom:dotted; border-bottom-width:1px; font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: bold; width:70%; } .sideheader{ position:absolute; margin-top:9px; top:0px; left:75%; padding-bottom:2px; border-bottom:dotted; border-bottom-width:1px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; width:25%; } h1#latesttemplates{ position:absolute; margin-top:0px; padding-top:50px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; border-right:dotted; border-right-width:1px; width:72.7%; height:105%; top:0; } .sidebarlist{ position:absolute; margin-top:9px; top:25px; left:695px; } .sidebarlist li{ list-style-image:none; list-style-type:none; } #templateholder{ position:absolute; height:105px; width:140px; border:solid 1px; } .toprow{ top:100px; } .bottomrow{ top:330px; } .descriptoprow{ top:215px; } .descripbtmrow{ top:445px; } #templatedescript{ position:absolute; width:140px; height:105px; } #templatedescript table{ width:140px; } .descrip{ text-align:left; font-weight:bold; font-size:12px; } .answer{ text-align:right; font-size:12px; } .P{ color:#FF0000; text-decoration:underline; font:Arial, Helvetica, sans-serif; font-size:12px; border-right:1px solid; border-right-color:#FF0000; margin-left:12%; padding-right:5px; } .D{ color:#FF0000; text-decoration:underline; font:Arial, Helvetica, sans-serif; font-size:12px; margin-left:5% } 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! Heya 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 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 |