CSS - Images Aligned Differently In Safari And Ie/firefox
You'll have to bear with me on the CSS, the file is a mess. I couldn't get it to do what I want, so I had to copy the file from someplace else, so there's alot of code commented out.
The HTML is much cleaner though! The issue is in the image above is that the 'Contact' and 'Back to Projects' images are too high in Safari. In IE and Firefox they're placed correctly. All the other images on the rest of the site line up fine, as you can see with the JW logo, Resume link, and even the bar across the screen All the images are in their own < li > (I think it's weird myself, but it works). And the placement is done in the CSS. Code: <li id="ResumeHigh"><a href="resume.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('resume','','images/resume_rollover.gif',1)"><img src="images/resume.gif" name="resume" border="0" id="about" /></a></li> <li id="ContactHigh"><a href="contact.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','images/contact_rollover.gif',1)"><img src="images/contact.gif" name="contact2" border="0" id="contact2" /></a></li> <li id="BackHigh"><a href="index.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Back','','images/back_to_proj_rollover.gif',1)"><img src="images/back_to_proj.gif" name="Back" width="141" height="9" border="0" id="Back" /></a></li> And the CSS Alignment: Code: #ResumeHigh {left:550px; top: 62px; width: 141px; height: 11px;} #ContactHigh {left:550px; top: 78px; width: 141px; height: 11px;} #BackHigh {left: 550px; top: 101px; width:141px; height:9px;} Full Pages: http://www.jerrywatersarchitect.com/sample/contact.asp http://www.jerrywatersarchitect.com/sample/jw2.css Any ideas whats causing the 'Contact' and 'Back to Projects' to be a few pixels too high? I appreciate any help you can provide. Similar TutorialsHey guys i have some image layout problems with my images on safari and firefox on Mac only. Firefox and safari on PC seem fine but its only happening on Mac. The positioning of the images have moved dramatically. Not sure how to fix it CSS is validated and so is xhtml strict I am working on a development site (http://dev.asbco.com/products/commercialindustrial/ ) and I am getting different looks in Safari and Chrome. IE8/FireFox 3/Opera all render the page correctly, Safari and Chrome are off. Any ideas how to fix this issue? Thanks! [EDIT] I meant Safari and Chrome not Safari and FireFox 3. Wow I REALLY hate CSS. For hours I have been trying to figure this out: Here is some HTML Code: <td> <div class="linksbar"> <div class="linkstext"> link - link - link - link <img src="imagelink.jpg"> <img src="imagelink2.jpg"> </div> </div> </td> [CODE] the CSS [CODE] .linksbar { height: 28px; background-image: url(bg.jpg); } .linkstext { vertical-align: middle; line-height: 28px; font-weight: bold; color: white; } First problem: in Chrome, the text rests at the bottom of the div. I want it in the middle. Second problem: in IE it looks like a mess. The text is sort of in the middle (more towards the bottom). the image links are at the very top. The image link height is like 20 or something. Hi everybody, I'm sure there is a very simple solution to this layout problem but I haven't been able to fix it. My design displays perfectly in Firefox but is out of place by 40px in IE. URL The CSS in question is certainly this div: Code: #sub-content ul li a { ... margin-left: -40px; position: relative; } I've tried various IE hacks, such as the ones mentioned on Centricle, e.g: Code: div>#sub-content ul li a { margin-left:0px; } But to no avail. Would a CSS guru mind helping me out? How to make images that are right aligned with the web page window? Anyone helps? Thanks in advance. Not sure if this should go in HTML forum or here, but there is CSS involved, so... Anyways, have a page here with 3 images aligned right. (Currently they are floated right, but problem originally was seen with aligned right, changed to css float and problem is the same). http://www.4for4.com/draft_board/to...r_id=HOTSTOVE13 I only see the issue in Chrome, but in Chrome if I refresh the browser, about every third or forth time the text will not wrap around one of the bottom 2 images in the main content area (Hancock & Theron). The text will just lay over the top of the image. If I refresh it will work again, but randomly will not render correctly over one of the two images that is aligned right. Is this just a weird Chrome rendering issue? Or is there some property I can add to the image that will force this to not happen? Thanks a lot. I'm currently creating a simple website using css and its looks fine in IE however the nav bar is not aligned with everything else in Firefox. Sorry i'm new at CSS, thanks for the help in advance. Here is the site: insightchirocare.ca Here is the css code: Code: /* CSS Document */ *{ padding:0; margin:0; width: auto; } body { font-family:Verdana, Arial, Helvetica, sans-serif; background-repeat:repeat-x; background-color:#ffffff; padding:0; margin:0; } #container { width:800px; margin:auto; padding-top: 30px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; } /* HEADER IMAGE */ #header{ background-repeat:no-repeat; background-image: url(images/header.gif); height: 150px; width: 800px; float:left; margin:300 px; padding-top: 0px; padding-right: 0px; padding-bottom: 3px; padding-left: 0px; } /* HEADER BACKGROUND IMAGE END */ /* NAVIGATION */ #nav{ width:800px; float:right; height:30px; margin-top: 0px; margin-left: 0px; margin-bottom: 0px; margin-right: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 3px; padding-left: 0px; } .menu ul{ padding:0; margin:0; list-style-type:none; list-style:none; display:inline; } .menu li{ padding-right:0px; margin:0 0px 0 0; height:30px; list-style-type:none; list-style:none; display:inline; float:left; } span{ display:none; } #home a{ background:url(images/nav_bar/home.gif); width:74px; height:30px; display:block; } #home a:hover { background:url(images/nav_bar/home_gr.gif); width:74px; height:30px; display:block; } #home a:active { background:url(images/nav_bar/home_gr.gif); width:74px; height:30px; display:block; } #about_us a{ background:url(images/nav_bar/about_us.gif); width:82px; height:30px; display:block; } #about_us a:hover{ background:url(images/nav_bar/about_us_gr.gif); width:82px; height:30px; display:block; } #about_us a:active{ background:url(images/nav_bar/about_us_gr.gif); width:82px; height:30px; display:block; } #first_visit a{ background:url(images/nav_bar/first_visit.gif); width:81px; height:30px; display:block; } #first_visit a:hover{ background:url(images/nav_bar/first_visit_gr.gif); width:81px; height:30px; display:block; } #first_visit a:active{ background:url(images/nav_bar/first_visit_gr.gif); width:81px; height:30px; display:block; } #gonstead_chiro a{ background:url(images/nav_bar/gonstead_chiro.gif); width:162px; height:30px; display:block; } #gonstead_chiro a:hover{ background:url(images/nav_bar/gonstead_chiro_gr.gif); width:162px; height:30px; display:block; } #gonstead_chiro a:active{ background:url(images/nav_bar/gonstead_chiro_gr.gif); width:162px; height:30px; display:block; } #faq a{ background:url(images/nav_bar/faq.gif); width:71px; height:30px; display:block; } #faq a:hover{ background:url(images/nav_bar/faq_gr.gif); width:71px; height:30px; display:block; } #faq a:active{ background:url(images/nav_bar/faq_gr.gif); width:71px; height:30px; display:block; } #kid_chiro a{ background:url(images/nav_bar/kids_chiro.gif); width:124px; height:30px; display:block; } #kid_chiro a:hover{ background:url(images/nav_bar/kids_chiro_gr.gif); width:124px; height:30px; display:block; } #kid_chiro a:active{ background:url(images/nav_bar/kids_chiro_gr.gif); width:124px; height:30px; display:block; } #testimonials a{ background:url(images/nav_bar/testimonials.gif); width:105px; height:30px; display:block; } #testimonials a:hover{ background:url(images/nav_bar/testimonials_gr.gif); width:105px; height:30px; display:block; } #testimonials a:active{ background:url(images/nav_bar/testimonials_gr.gif); width:105px; height:30px; display:block; } #contact_us a{ background:url(images/nav_bar/contact_us.gif); width:101px; height:30px; display:block; } #contact_us a:hover{ background:url(images/nav_bar/contact_us_gr.gif); width:101px; height:30px; display:block; } #contact_us a:active{ background:url(images/nav_bar/contact_us_gr.gif); width:101px; height:30px; display:block; } /* NAVIGATION END*/ /* LEFT_CONTENT*/ #left_content { height: 450px; width: 500px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #757171; margin-top: 0px; margin-left: 0px; float: left; margin-right: 5px; background-color:ffffff; } /* LEFT_CONTENT END*/ /* REG_CONTENT*/ #reg_content { height: auto; width: 800px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #757171; margin-top: 0px; margin-left: 0px; background-color:#ffffff; } /* REG_CONTENT END*/ /* RIGHT_CONTNET*/ #right_content{ height: 450px; width: auto; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #757171; padding: 0; margin-top: 0px; margin-left: 0px; margin-bottom: 0px; margin-right: 0px; background-color:#e3e3e3; } /* RIGHT_CONTENT END*/ h1 { padding:0; margin:0; font-size:16px; color:#008bcf; font-family: Verdana; font-weight: normal; } h2 { padding:0; margin:0; font-size:12px; color:#008bcf; font-family: Verdana; font-weight: normal; } p { padding:0; margin:0; font-size:12px; color:#757171; font-family: Verdana; } /* FOOTER*/ #footer { padding : 0; width: 800px; height: 40px; background: url(images/footer.gif); margin-top: 2px; margin-right: auto; margin-bottom: 30px; margin-left: auto; } /* FOOTER END*/ .clearfloats {clear:both;} A:link { text-decoration: underline; color: #008BCF; } A:visited { text-decoration: underline; color: #008BCF; } A:active { text-decoration: underline; color: #18fa07; } A:hover { text-decoration: underline; color: #18fa07; } I have two images, the first (nameplate) i have set to be ontop and centered, whose left side "hits" the side of the window when the window gets small enough like its supposed to. The second is set beneath it (silverplate) and is smaller than nameplate(1500x800). I want this to be centered too so that when the browser is resized it follows the nameplate and doesnt move against it or go out of window. I cant seem to achieve this effect with any combination of positioning and nested divs, the silverplate always goes off the left side of the window and tracks different than the nameplate. Why dont both images behave the same? How would i make them do that? Code: <style> #nameplate { top:0px; height:1500px; z-index:90; height:1500px; overflow:visible; } .img { position:relative; display:inherit; margin-left:auto; margin-right:auto; } </style> </head> <body bgcolor="#00FF33" style="margin:0px; padding:0px; max-height:1500px; overflow:visible;"> <div id="nameplate"> <img src="Assets/NamePlate.png" style=" z-index:98; opacity:0.5;" class="img" /> <img src="Assets/SilverPlate.png" style="z-index:95; left:-300px; top: -1000px; width:100px; height:100px;" class="img"/> </div> Code: <?xml version="1.0" encoding="UTF-16"?> <!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> <title>Tableless structure</title> <style type="text/css"> <!-- * { font: 12px Verdana, Geneva, Arial, Helvetica, sans-serif; width: 800px; height: 500px; margin-left: auto; margin-right: auto; } body { margin: 0px; padding: 0px; margin-top: 40px; } #head { background: LightGreen; width: 100%; height: 15%; } #menu { background: Pink; float: left; width: 20%; height: 80%; } #body { background: LightBlue; float: right; width: 80%; height: 80%; } #foot { background: Silver; clear: both; width: 100%; height: 5%; } --> </style> </head> <body> <div id="head">Header</div> <div id="menu">Menu</div> <div id="body">Body</div> <div id="foot">Footer</div> </body> </html> This code works fine on Firefox by centering horitzontally the page but in IE7 stays left aligned. Can you help? Thank you! Running here I've been working some more on a new layout for one of my websites this weekend. However, I'm having trouble getting the layout to display the same in all browsers. Everything is looking exactly how I hoped in Firefox, but when the same page is viewed in Internet Explorer, some things appear rather differently. Sample Page: http://www.mybb-emods.com/new/index.htm CSS File: http://www.mybb-emods.com/new/stylesheet.css Firstly, the background of the navigation bar at the top of the page should remain grey at all times apart from when a link is hovered, in which case it changes to blue. This is happening in both browsers, but in Internet explorer, only part of the background is changing as opposed to all of it. It's easier to show this than to explain, so I've posted two screenshots below to demonstrate. The first screenshot shows the navigation bar in Firefox, the second shows the same bar in Internet Explorer. I'm assuming this is probably something to do with the padding values I have assigned, but I have been unable to find a working solution for all browsers. Also, I'm having a problem with the left margin of my main page content. The margins down the left side of the main page should all be 20px from the left hand border, and this shows correctly again in Firefox. However, in Internet Explorer, the left margin of the navigation bar appears correctly, but the content beneath it appears to have a much larger margin and as such the layout appears incorrectly. If anyone has any idea how to fix these problems then I would very much appreciate the advice. Thanks. Hi, I have an issue with Vertical menu contained in Re-sizable DIV. This menu appears differently in IE vs Firefox (Please refer attached Image) http://img402.imageshack.us/img402/7830/resize.png URL Attached Image Following is the Code for the Style class mentioned in the image Code: .cwc_navMenuLabel { line-height:14px; vertical-align:top; white-space:nowrap; } .AccButton{ float: right; align:right; text-align: right; position: relative; top: -1px; z-index: 10; width: 16px; margin:0 5px 0 0; } /*USE THIS FOR IE*/ .AccLiIE { display: inline; background-color: #A2C2E4; background-image: url(../../images/acordion_backgr.png); background-repeat: repeat-x; border-top: 1px solid #7591AC; height: 19px; white-space: nowrap; } /*USE THIS FOR NON-IE BROWSER*/ .AccLi { background-color: #A2C2E4; background-image: url(../../images/acordion_backgr.png); background-repeat: repeat-x; border-top: 1px solid #7591AC; white-space: nowrap; } Please let me know the change that i have to do in CSS to make the menu appear in IE the way it looks in Firefox. Thanks and appreciate your help Well I'm pretty uneducated in CSS, I have just played around with it hours and hours and always figured out what I was trying to do. But right now I am stumped. Please view the following page in FireFox if you have it: http://www.iqdrop.com/newiq/index.php Then in IE You see the Google ad is dropped way down in IE for some reason and overlaps my menu, and the <DIV> containing the word "index.php" is also taller in IE. I'm not sure what is wrong and I've been trying all sorts of things with no luck. Thanks for any help. i have a two div tags but the upermost tag sits outside the boundary of the one below and the page seems to be over stretched in IE7 the page address is www.ftpimage.com does anyone have any suggestions my css is as follows Code: body { margin: 0px; background: url(../img/top_bg.gif); background-repeat: repeat-x; font-family: Verdana, Arial, sans-serif; font-size: "15"; } p { line-height: 50px; margin: 11px 0 10px 0; padding: 0px; } h2 { color: #9f9f9f; margin:0px; padding:0px; font-size: 15px; } ul { font-size: 10px; margin:0; padding:0; list-style-image: url(../img/bullet.gif); } a { color: #93B300; } a:hover { text-decoration: none; } blockquote{ background: #F7FDE3; color: #606060; padding: 0px; } /**** Main Container ***/ #wrap { margin-left: 10px; margin-right: auto; width: 640px; } /**** Top ***/ #top { width: 155%; height:85px; color: #fff; background: #000 url(../img/top_bg.gif); overflow:hidden; } #top h2 { color: #87CEFA; letter-spacing: 3px; font-size: 2.4em; font-weight: normal; position: relative; margin: 0px; top: 33px; display: block; float: left; background: url(../img/bg_t.gif) no-repeat; padding-left: 8px; } #top h2 a { color: white; text-decoration: none; } #top h2 a:hover { color: #93B300; } #page { margin-right: 20px; max-width: 10px } /**** Main Menu ***/ #menu { display: block; float:right; } #menu ul { margin: 0; list-style: none; } #menu li { display: block; float: left; white-space: nowrap; } #menu li a { display: block; padding: 20px 10px 12px 20px; text-decoration: none; color: #fff; font-weight: bold; } * html #menu a {width:1%;} #menu li a:hover { background: url(../img/bg_menu.gif); } #menu li a.current { letter-spacing: 1px; color: gray; background: url(../img/bg_menu.gif); } #menu li a.current:hover { color: #fff; } /**** Content Container ***/ #content { width: 65%; margin-top:30px; border: solid 2px black; } #content h2 { margin: 0; padding: 10px 0 10px 0; } /**** Content ***/ #left ul { padding: 15px 0 15px 35px; margin:0; } #left li { margin-bottom:5px; } #left .box { width: 390px; float:left; display: block; margin-left: 20px; display: inline; } /**** Sidebar ***/ #right { width: 315px; float: right; display:block; margin-top: 10px; } #right .box { width: 20em;/*280px*/ background: #87CEFA; border: 1px solid #E1E1E1; padding:10px 10px 55px 10px; float: right; } #right .box h2 { font-size: 3.1em; margin: 0px 0 0px 0; padding:0px 0 5px 0; } #right .box a { margin: 10px 0 10px 0; color: #93B300; font-size: 20px; } #right .box p { margin: 5px 0 10px 0; line-height: 15px; } #right .box ul { padding: 0 0 0px 20px; margin:10px 0 10px 0; } #right .box li { margin-top:5px; } html>body .box { width: auto; min-width: 20em; } #nav{ list-style: none; margin: 2.0em 0; width: 25em; float: right;} #nav li{ padding: 0; margin: 0; } #nav a{ display: block; height: 2.0em; padding: 0.3em 0.3em 0.3em 0.8em; border:solid; border-width:medium; border-bottom: 2px; /*solid #1a1a1a*/ border-top: 2px; /*solid #1a1a1a*/ border-color:Black; color: black; background-color: #87CEFA; font-weight: bold; text-decoration: none; font-size:medium } #nav a:hover{ color: #1a1a1a; background: url(../img/bg_t.gif) no-repeat; background-color: #fff; font-weight: bold; } /**** Clear Div ***/ #clear { display: block; clear: both; width: 100%; height:1px; overflow:hidden; } /**** Footer ***/ #footer { margin: 40px auto 0 auto; text-align: center; border-top: dotted 1px gray; padding: 20px 0 20px 0; width: 70%; } #footer p { margin: 0px; padding: 0; Hi, I'm having an interesting problem. I have a left floated containing div and then a right floated containing div to split multiple contents between the left and right side of a popup window. It works great in IE 7, Chrome, FF3, but for some reason not in FF2. In FF2, it forces the contents of the right floated containing div below the left floated div (instead of beside it) and makes it's width the entire width of the popup. Any idea why? (there is a reason I had to put all the css directly in the code - normally it's separated) Here's the code: Code: <div style='padding: 15px; text-align: left;'> <div style='float: left;'> <table style='margin-top:16px; font-size: 12px; font-family: Verdana,Arial,sans-serif;'> <tr> <td>Name:</td><td colspan='2'><input id='popupName' name='popupName' style='float:left' type='text'></td> </tr> <tr> <td style='padding:5px 0 17px 0;'>Type:</td><td style='padding:5px 0 17px 0;' colspan='2'><select id='popupType' name='popupType' style='float:left; width: 148px; height: 21px' ></select></td> </tr> <tr> <td style='padding-bottom: 14px;' colspan='3'><div style='width: 280px'>This is some text.</div></td> </tr> <tr> <td style='padding-bottom: 5px;'>Group Title:</td><td style='padding-bottom: 5px;'><input id='popupGroupTitle' name='popupGroupTitle' style='float:left' type='text'></td><td></td> </tr> <tr> <td>Titles:</td><td><input id='popupTitles' name='popupTitles' style='float:left' type='text'></td><td><input style='float:left; padding: 0;' type='button' value='Add >>' onclick=\"addToList()\"></td> </tr> </table> </div> <div style='float: right;'> <div style='margin-bottom:5px;'>Element Titles:</div> <select id='newOptionSelect' style='float:right; width: 247px;' size='12'></select> <input id='popupDeleteBtn' style=\"clear: right; background: rgb(190,190,190) url('/url') no-repeat center center; float:right; margin: 5px 2px;\" type='button' onclick='removeFromList(\"newOptionSelect\", newOptionArray)'/> <input id='popupMoveDownBtn' style=\"float:right; background: rgb(190,190,190) url('/url') no-repeat center center; margin: 5px 2px;\" type='button' onclick='moveDown(\"newOptionSelect\", newOptionArray)'/> <input id='popupMoveUpBtn' style=\"background: rgb(190,190,190) url('/url') no-repeat center center; float:right; margin: 5px 2px;\" type='button' onclick='moveUp(\"newOptionSelect\", newOptionArray)'/> </div> </div> </div> one line of text isn't in the position that i want it to be for ff and ie. Chrome is able to read the css code: chrome: Code: p1 { line-height: 1.3em; font-size: 1.2em; font-weight: bold; display: block; -webkit-margin-befo 5.4em; -webkit-margin-after: 1em; -webkit-margin-start: 220px; -webkit-margin-end: 0px; } ff,ie: p1{ line-height: 1.3em; font-size: 1.2em; font-weight: bold; } I want the " learning from questions" at the bottom right of the logo. Thanks for helping! site link: http://www.nyitforums.com/ Hi, I've searched various threads in this forum, even tried re-iterating the question in another similar post to no avail. How is it that in Firefox (1.0) I get overflow occuring on a nested div, yet in IE (6) I do not? i would like vertical scrollbars ONLY, if content is overflowing and not horizontal scrollbars-using a WC3 valid solution if possible. Thanks in advance A snippet of my css... PHP Code: /*css document*/ /* container div class*/ .outer{ width: 336px; height: 448px; border-color: #000000; border-width: 1px; border-style: solid; float: left; margin: 0 0 0 10px; background-color: #ffffff; /*background:url("../images/pg_curl.gif") top right no-repeat;*/ } /* inner-content div class*/ .inner { width: 298px; height: 388px; border-color: #000000; border-width: 1px; /*margin: 34px 0 0 19px;*/ margin: 2px 0px 0px 19px; font-size: 12px; /*line-height: 15px;*/ color: #000000; clear: both; /*scrollbars for content overflow*/ overflow:auto; } /* Example of problem: at the momment, in Firefox inserting this into the .inner classed div is creating horizonal overflow*/ .navigation { width: 298px; } .navigation ul { list-style: none; margin: 0; padding: 0; } .navigation li { border-bottom: 1px solid #ED9F9F; } .navigation li a:link, .navigation li a:visited { display: block; padding: 2px 2px 2px 0.5em; border-left: 10px solid #711515; border-right: 1px solid #711515; background-color: #B51032; color: #FFFFFF; text-decoration: none; } .navigation li a:hover { background-color: #711515; color: #FFFFFF; } .navigation ul ul { margin-left: 12px; } .navigation ul ul li { border-bottom: 1px solid #711515; margin:0; } .navigation ul ul a:link, .navigation ul ul a:visited { background-color: #ED9F9F; color: #711515; } .navigation ul ul a:hover { background-color: #711515; color: #FFFFFF; } Hi everyone A bit of a call for help with some niggly issues - all found on the following page and css: http://www.crashingbydesign.com.au/rsaa/index.html http://www.crashingbydesign.com.au/rsaa/home.css 1. Two of the absolutely positioned divs don't show up at all in IE6, but they're fine in Opera 7.5 and Firefox 1.0PR. The ones with id's "title" and "utility" are the problem ones and I can't see what the problem is with IE. In addition to this, this div shows up in a different position in both Opera and Firefox (10 pixels higher in Opera). Please help!! 2. The links in the "mainnav" div are only clickable either at the very top of the <a> element (Firefox) or the very bottom of the <a> element (Opera), however in IE the whole <a> element is completely clickable. I can't see any element that is overlapping. What is going on?? All help appreciated. Cheers Bevester The link to my page is: crowncontainer.com/dev/activity_test.php you'll have to post the www. in front, i'm a new user and can't post URL???? I have validated both the CSS and the XHTML. If you open in IE, the width starts out at 200px, which is what I've defined in CSS. If you open it in Firefox, it is wider and I don't know why? Also - when you click on the submit button, the program will return data in an AJAX call and the data will load in a div directly underneath the form. When the data is returned in IE, the width of the left nav will increase to the same width that displays in Firefox. Because of this, I have to believe that there is some buggy code that causes it to 'sort of' work in IE but not in Firefox? Can someone take a stab at this and help me? I want to keep my left nav width to 200px; I am making a Mac help site for a friend, and want the site to be compatible with as many browsers as possible. I am aware that IE doesn't follow the rules with css, which is why I have made a plain version of the site as well. Basically, the site is composed of two tables, the top one is the banner with buttons, and the bottom one has text. The background is fixed, as is the top table (so the only thing that moves when you scroll is the table with the text). My problem is that the top table can be centered either for Safari, or Firefox, but I have not found a way to center both of them. EDIT: The site is at www.ihelpnyc.com/dave/index1.html . It will probably change, but it's a good reference to see what I'm doing When I do this, it is centered on Firefox: Code: <style type="text/css"> <!-- body { background-image: url(background.gif); background-repeat: repeat-x; background-attachment:fixed; background-color: #000000; } #toptable { position: fixed; top: 0; height: 140px; bottom: auto; z-index: 2; text-align: center; margin-left: auto; margin-right: auto; } #encapsule { margin-left: auto; margin-right: auto; } #centered { text-align: center; } #centered table { margin: 0 auto; text-align: auto; } #bottable { position: relative; margin-left: auto; margin-right: auto; top: 140px; z-index:1; } --> </style></head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div align="centered" id="encapsule"> <table width="720" border="0" cellpadding="0" cellspacing="0" id="encase"> <tr> <td><table width="200" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#2C2C2C" id="toptable"> <tr> <td><table width="720" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01"> <tr> <td colspan="5"><img src="images/index_01.gif" width="360" height="109" alt=""></td> <td colspan="2"><img src="images/index_02.gif" width="360" height="109" alt=""></td> </tr> <tr> <td><img src="images/index_03.gif" width="47" height="31" alt=""></td> <td><a href="index1.html"><img src="images/index_04.gif" alt="" width="102" height="31" border="0"></a></td> <td><a href="about.html"><img src="images/index_05.gif" alt="" width="92" height="31" border="0"></a></td> <td><a href="contact.html"><img src="images/index_06.gif" alt="" width="104" height="31" border="0"></a></td> <td colspan="2"><a href="help.html"><img src="images/index_07.gif" alt="" width="145" height="31" border="0"></a></td> <td><img src="images/index_08.gif" width="230" height="31" alt=""></td> </tr> <tr> <td><img src="images/spacer.gif" width="47" height="1" alt=""></td> <td><img src="images/spacer.gif" width="102" height="1" alt=""></td> <td><img src="images/spacer.gif" width="92" height="1" alt=""></td> <td><img src="images/spacer.gif" width="104" height="1" alt=""></td> <td><img src="images/spacer.gif" width="15" height="1" alt=""></td> <td><img src="images/spacer.gif" width="130" height="1" alt=""></td> <td><img src="images/spacer.gif" width="230" height="1" alt=""></td> </tr> </table></td> </tr> </table></td> </tr> </table> </div> When I do the following, it centers it on Safari: Code: <style type="text/css"> <!-- body { background-image: url(background.gif); background-repeat: repeat-x; background-attachment:fixed; background-color: #000000; } #toptable { position: fixed; top: 0; height: 140px; bottom: auto; z-index: 2; } #encase { position: relative; margin-left: auto; margin-right: auto; } #bottable { position: relative; margin-left: auto; margin-right: auto; top: 140px; z-index:1; } --> </style></head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="720" border="0" cellpadding="0" cellspacing="0" id="encase"> <tr> <td><table width="200" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#2C2C2C" id="toptable"> <tr> <td><table width="720" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01"> <tr> <td colspan="5"><img src="images/index_01.gif" width="360" height="109" alt=""></td> <td colspan="2"><img src="images/index_02.gif" width="360" height="109" alt=""></td> </tr> <tr> <td><img src="images/index_03.gif" width="47" height="31" alt=""></td> <td><a href="index1.html"><img src="images/index_04.gif" alt="" width="102" height="31" border="0"></a></td> <td><a href="about.html"><img src="images/index_05.gif" alt="" width="92" height="31" border="0"></a></td> <td><a href="contact.html"><img src="images/index_06.gif" alt="" width="104" height="31" border="0"></a></td> <td colspan="2"><a href="help.html"><img src="images/index_07.gif" alt="" width="145" height="31" border="0"></a></td> <td><img src="images/index_08.gif" width="230" height="31" alt=""></td> </tr> <tr> <td><img src="images/spacer.gif" width="47" height="1" alt=""></td> <td><img src="images/spacer.gif" width="102" height="1" alt=""></td> <td><img src="images/spacer.gif" width="92" height="1" alt=""></td> <td><img src="images/spacer.gif" width="104" height="1" alt=""></td> <td><img src="images/spacer.gif" width="15" height="1" alt=""></td> <td><img src="images/spacer.gif" width="130" height="1" alt=""></td> <td><img src="images/spacer.gif" width="230" height="1" alt=""></td> </tr> </table></td> </tr> </table></td> </tr> </table> Any help is appreciated, as I am totally stuck. I have been using http://theodorakis.net/tablecentertest.html to see which works on both Firefox and Safari, but none of them work for both. Thanks! EDIT: The site is at www.ihelpnyc.com/dave/index1.html . It will probably change, but it's a good reference to see what I'm doing Hi all, I was wondering if someone could help me out. I have two divs on top of each other: 1 is a menu, 1 is a grid. In IE, the grid is displayed directly below the menu. However, when I view the page in Safari or Firefox, the grid is displayed below and to the right of the menu. See screenshots I have also included my HTML and CSS below. Thanks for your help! Code: /* Submenu */ .submenu{height:32px;background:url(../images/submenu_bg.jpg);border-top:1px solid #ccc; width:105%; } .submenu a:active,.submenu a:focus{text-decoration:underline;} .submenu ul{float:left;z-index:19; } .submenu ul li ul{position:absolute;margin-top:29px;z-index:98;left:-999em;background-color:#f5f5f5;display:block;width:150px;} .submenu li{float:left;list-style:none;background:url(../images/submenu_divider.gif) no-repeat right top;z-index:20;} .submenu li a{color:#000000;text-decoration:none;font-size:10px;padding:7px 15px 7px 15px;display:block;font-weight:bold;font-family:Geneva, Arial, Helvetica, sans-serif;} .submenu li a:hover{background:#f8f8f8 url(../images/submenu_divider.gif) no-repeat right top;} .submenu li li a{color:#000000;text-decoration:underline;background:#F8F8F8;border-bottom:1px solid #CCC;border-right:0;display:block;width:120px;text-decoration:none;font-weight:normal;background-image:none;} .submenu li li a:hover{color:#333;background-color:#f3f3f3;display:block;width:120px;border-bottom:1px solid #CCC;border-right:0;background-image:none;} .submenu .active-menu ul{border-left:1px solid #CCC;border-right:1px solid #CCC;} .submenu .active-menu{color:#FFF;text-decoration:none;background:#f5f5f5 url(../images/submenu_divider.gif) no-repeat top right;} .submenu .active-menu ul li a:hover{text-decoration:underline;border-right:0;background:#fff url(../images/submenu-li-li-hover.gif) repeat-x top;color:#535353;} .grid_maindiv { position: relative; border: 1px solid #cbc7b8; overflow: hidden; width: 105%; font-family: verdana,arial; } .grid_table { background-color: white; width: 100%; font-size: 10pt; } .grid_table_header { background-image: url('../media/header.png'); height: 27px; color: white; font-weight: bold; font-size: 14pt; } .grid_table_resize_row { background-image: url('../media/resize.gif'); width: 2px; margin: 0px; } .grid_table_header_row { background-color: #EBEADB; font-weight: bold; cursor:pointer; padding-left: 5px; padding-bottom: 0px; position: relative; height: 18px; overflow: hidden; font-size: 10px; cursor:pointer; border-bottom:2px solid #cbc7b8; border-top: 1px solid white; border-left: 1px solid white; border-right: 1px solid white; margin-bottom: 0px; background-image: url('../media/column.png'); } .grid_table_header_row_hover { font-weight: bold; cursor:pointer; padding-left: 5px; padding-bottom: 0px; position: relative; height: 18px; overflow: hidden; font-size: 10px; cursor:pointer; border-top: 1px solid white; border-left: 1px solid white; border-right: 1px solid white; margin-bottom: 0px; border-bottom:2px solid #f9b119; background-color: #FAF9F4; background-image: url('../media/column_on.png'); } .grid_column_resize { cursor: e-resize; width: 2px; background-color: #cbc7b8; border-bottom:2px solid #cbc7b8; padding-bottom: 0px; margin-bottom: 0px; } .grid_table_row_uneven { background-color: #EBEADB; } .grid_footer { background-color: #f9f9f9; height: 20px; color: #616161; } .grid_table_cell { padding-left: 2px; position: relative; border-bottom: 1px solid lightgray; height: 28px; overflow: hidden; margin: 0px; font-size: 10px; } Code: <body onmouseup="SetMouseDown(false);" topmargin="2"> <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"> <TR> <TD WIDTH="50%"> <FONT SIZE="-1" FACE="Arial"><A HREF="http://www.itsect.com/" CLASS="topnav">Home</A> <B> <A CLASS="topnav">text</A></B> <A HREF="https://secure.itsect.com/members/?_page=account:account" CLASS="topnav">Account</A> <A HREF="http://www.itsect.com/support/" CLASS="topnav">Help</A></FONT></TD> <TD WIDTH="50%"> <P ALIGN=RIGHT><B><FONT SIZE="-1" FACE="Arial"><a CLASS="topnav">john</a></FONT></B><FONT SIZE="-1" FACE="Arial"> | <A HREF="https://secure.itsect.com/members/?_page=account:account" CLASS="topnav">My Account</A> | <A HREF="http://www.itsect.com/members/?_page=account:account&_logout=Y" CLASS="topnav">Logout</A></FONT></TD> </TR> </TABLE> <HR SIZE=1 COLOR="#000000" WIDTH="100%"> <a href="view.php"><img src="images/ss_logo.gif" border="0" height="39" width="243"></a> <br> <div class="submenu"> <ul> <li><a href="view.php">Show All</a> </li> <li><a href="view.php?trash=1">View Trash</a> </li> <li><a href="http://www.itsect.com/engine/filterpop.php" title="SiteSnipe - Create and View Filters" onclick="return GB_show('SiteSnipe - Create and View Filters', this.href,500,600)">Create/View Filters</a> </li> <li><a href="http://www.itsect.com/engine/reportspop.php" title="SiteSnipe - Schedule Reports" onclick="return GB_show('SiteSnipe - Schedule Reports', this.href,500,600)">Schedule Reports</a> </li> <li><a style="color: #000080; text-decoration: none;">Viewing: All Listings</a></li> <form action="view.php" method="post"> <li><a>Quick Search: <input type="text" name="srch" value="" CLASS="frm2"> <input type="image" src="images/go.gif" name="go" border="0" ALIGN="MIDDLE"></a> </li> </form> </ul> </div> <div class='grid_maindiv' id="grid" width=100%> GRID </div> |