CSS - Centers Properly In Ff But Not Ie
Hi there,
I'm trying to get the images from each page to be centered in their td's, which appears to work fine in FF, but not in IE. Any help is greatly appreciated. here's the css; Code: .borders { border: 1px solid #666666; text-align:left; font-family:Century Gothic, Arial, sans-serif; font-size:11px; align:center; } } .text { font-family:Century Gothic, Arial, sans-serif; font-size: 11px; color: #333333; text-align:center; } } .listtext { font-family:Century Gothic, Arial, sans-serif; font-size: 11px; color: #333333; text-align:left; border: 1px solid #666666; } table.menu { border:1px solid #999999; background:#CCCCCC; align:center; } table.menu a:link, table.menu a:visited { display:block; font-family:Century Gothic, Arial, sans-serif; font-size:12px; line-height:16px; color:#006600; text-decoration:none; padding: 2px 2px; } table.menu a:active, table.menu a:hover { color:#CCCCCC; background:#006600; } table.menu a { width:144px; display:block; font-family:Century Gothic, Arial, sans-serif; font-size:12px; line-height:16px; color:#006600; text-decoration:none; padding: 2px 2px; } .GPlink { font-famil:Century Gothic, Arial, sans-serif; font-size:10px; color:#000000; } .GPlink a { font-family:Century Gothic, Arial, sans-serif; font-size:10px; align:center; color:#333333; } .pagetitletext { font-family:Century Gothic, Arial, sans-serif; font-size:13px; align:left; color:#006600; font-weight:bold; } .piccenterind {width: 212px; margin-left: auto; margin-right: auto;} .piccentercont {width: 322; margin-left: auto; margin-right: auto;} and the html; Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Kyrtsakas Law - Home</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="description" content="Kyrtsakas Law Office - Title Insurance from an experienced Real Estate Lawyer offers the best protection for your investment"> <meta name="keywords" content="Kyrtsakas, Law, Law Office, Lawyer, real estate, estate, will, title, Windsor, purchases, mortgages, power of attorney, attorney, CAW"> <link href="kyrtsakas_styles.css" rel="stylesheet" type="text/css"> </head> <body topmargin="0" bgcolor="#666666"> <table width="640" align="center" cellpadding="2" cellspacing="2" bgcolor="#CCCCCC" class="menu"> <tr valign="top"> <td align="center" width="640" colspan="6"> <img src="images/Kyrtsakas_Header.jpg" alt="Kyrtsakas Law Office" name="header" id="header"> </td> </tr> <tr valign="top"> <td class="borders" width="106" colspan="1"> </td> <td class="borders" width="106" colspan="1"> <a href="http://www.kyrtsakaslaw.com">Home</a> </td> <td class="borders" width="106" colspan="1"> <a href="http://www.kyrtsakaslaw.com/profile.htm">Profile</a> </td> <td class="borders" width="106" colspan="1"> <a href="http://www.kyrtsakaslaw.com/tools.htm">Online Tools</a> </td> <td class="borders" width="106" colspan="1"> <a href="http://www.kyrtsakaslaw.com/contact.htm">Contact</a> </td> <td class="borders" width="106" colspan="1"> </td> </tr> <tr valign="top"> <td class="borders" width="106" colspan="1"> </td> <td width="212" colspan="2" class="borders"> <br> <div class="pagetitletext">Home</div><br> Welcome to <b>Kyrtsakas Law Office</b>.<br><br> <b>Christos Kyrtsakas</b>, <b>L L .B.</b><br><br> "For Nineteen years I have practiced law with an emphasis on <b>Real Estate</b>, including <b>Purchases, Sales, Mortgages</b>, and <b>Estate Law</b>, including <b>Wills, Powers of Attorney, and Probate</b>."<br><br> Call me today at (519)-974-6303 for an appointment to discuss your particular needs.<br><br> CAW Plan Welcome!<br><br> "<i>Having a Lawyer Makes it Safer for You</i>!"<br><br> </td> <td colspan="2" width="212"> <div class="piccenterind"><img src="images/Kyrtsakas_sign_sm.jpg"></div> </td> <td class="borders" width="106" colspan="1"> </td> </tr> <tr valign="top"> <td class="borders" width="106" colspan="1"> </td> <td class="borders" width="428" colspan="4"> </td> <td class="borders" width="106" colspan="1"> </td> </tr> </table> <table bgcolor="#CCCCCC" align="center" width="640"> <tr> <td align="center" class="GPlink" colspan="6"> website designed & maintained by <a href="http://www.graphixplus.com" target="_blank">Graphix Plus Web Development</a> - 2005 </td> </tr> </table> </body> </html> Similar Tutorialssite css View the index in IE and FF... It is centered how I want it in IE (directly under the picture), but not in FF. How can I fix this? (I realize it's most likely a bug in IE that allows it to display the way I thought it was supposed to, so what's the right way to get this to work?) Thanks Enjoy your weekends Bryan Bear with me please. I am brand new to html/CSS etc... I just cobbled together a page a few days ago using someone elses code as a reference, I hardly know what I did or how it works, but it works just like I want it to - Background centered and stationary (no scrolling with content), but the content does scroll, with NO horizontal scroll bar. You can view it he bit(dot)ly/rbsZsH - THIS IS WHAT I WANT MY OTHER PAGE TO DO Ok, so feeling smug, I tried to do another one like it, without the sidebar/header, etc... For the most part it works, EXCEPT - I have an unexpected horizontal scroll bar that goes about 50% across the browser and allows the user to pull the content off-center across the background. I have nearly pulled my hair out trying to fix it and put a hidden message under the content just for fun.. (make lemonade when you get lemons, right?) You can view second page he bit(dot)ly/qMbYl2 - THIS IS THE GOOFY PAGE The only real clue I have is that the first page is set to 780px wide and has this comment in the container div: /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */ My second page container div is set to 802px because I am using an image from Photoshop rather than a background color. Thank you if any of you can shed light on the situation. P.S. - I'm sure I've totally butchered the code, and you can assume when you answer that I can cut and paste but not really understand what you are saying. Something I think I'm not doing. I'm using something called niftyCorners and thought that was what was cauing the problem, but now I'm not so sure. I am trying to have this appear on a webpage for the reader to use: <script language="JavaScript"> <!-- alert("Sample JavaScript alert box 1."); alert("Sample JavaScript alert box 2"); alert("There you go, alert boxes \nTa da, and one with a new line!"); // --> </script> Now, I need to have the <pre> tag nested inside a div tag, but this doesn't validate. So, I nested the code tag inside the pre tag and it breaks my layout in IE 6.0. Why am I nesting at all? niftyCorners doesn't work very well when you put padding or margin on any div you want to have rounded corners. So, I'm trying to put a div round my pre tag, so I can round the div and I can use the pre tag to control margin/padding. If anyone has any ideas, I'd appreciate it. Hi. Any help would be appreciated. I am trying to cut down on my image sizes on my website: http://toptiertemplates.com, but i am having a few difficulties. I have this table which was created in photoshop which is off to the side. I would like to take just a slice of the table and repeat the image the full length of the table's original length. The page is written by placing everything with divs. I know how to set the image as a background and all and repeat it, however, when i do so, it replaces my website's background and just shows up as a white space. So i am wondering if I have to use layers of some sort or anything else. I'd appreciate some help. Thanks. So basically here's the problem.... I'm using a jquery folder tree. By default, there is a plus and minus sign designating expanded or collapsed. If you click the sign only, would the menu expand/collapse. However, for my needs, I need the entire name beside the sign to be clickable as well. So I adjusted certain items and it works... in Opera, Firefox, Safari, Flock, and Chrome... (All latest versions I just downloaded today). It doesn't, however, work in IE6 (yes.. I still use IE6). Have not tested in IE7 or IE8... I posted this in the CSS forum as it seems as though it's a CSS problem as opposed to Javascript or PHP... Anyways... here's the CSS file: Code: .treeview, .treeview ul { padding: 0; margin: 0; list-style: none; } .treeview ul { background-color: white; margin-top: 4px; } .treeview .hitarea { background: url(images/treeview-default.gif) -64px -25px no-repeat; height: 16px; width: 100px; margin-left: -16px; float: left; cursor: pointer; } /* fix for IE6 */ * html .hitarea { display: inline; float:none; } .treeview li { margin: 0; padding: 3px 0pt 3px 16px; } .treeview a.selected { background-color: #eee; } #treecontrol { margin: 1em 0; display: none; } .treeview .hover { color: red; cursor: pointer; } .treeview li { background: url(images/treeview-default-line.gif) 0 0 no-repeat; } .treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; } .treeview .expandable-hitarea { background-position: -80px -3px; } .treeview li.last { background-position: 0 -176px } .treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(images/treeview-default.gif); } .treeview li.lastCollapsable { background-position: 0 -111px } .treeview li.lastExpandable { background-position: -32px -67px } .treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; } .treeview-red li { background-image: url(images/treeview-red-line.gif); } .treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(images/treeview-red.gif); } .treeview-black li { background-image: url(images/treeview-black-line.gif); } .treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(images/treeview-black.gif); } .treeview-gray li { background-image: url(images/treeview-gray-line.gif); } .treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(images/treeview-gray.gif); } .treeview-famfamfam li { background-image: url(images/treeview-famfamfam-line.gif); } .treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(images/treeview-famfamfam.gif); } .filetree li { padding: 3px 0 2px 16px; } .filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; } .filetree span.folder { background: url(images/folder.gif) 0 0 no-repeat; } .filetree li.expandable span.folder { background: url(images/folder-closed.gif) 0 0 no-repeat; } .filetree span.file { background: url(images/file.gif) 0 0 no-repeat; } Here's the relevant nav menu code: Code: if (mysql_num_rows($result) != '0') { while($row = mysql_fetch_array($result)) { $string5= $row['string']; $state3 = $row['state']; $county3 = $row['county']; $city3 = $row['city']; $item3 = $row['item']; if ($state2 != $state3) { if ($i != 1) { $treeview .= "</ul></li></ul></li></ul></li>"; } $i++; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$state3."</a></div><br />"; $state2 = $state3; $j = 1; } if ($county2 != $county3) { if ($j != 1) { $treeview .= "</ul></li></ul></li></ul>"; } $j++; $treeview .= "<ul style=\"display:none;\">"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$county3."</a></div><br />"; $county2 = $county3; } if ($city2 != $city3) { $treeview .= "<ul style=\"display:none;\">"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$city3."</a></div><br />"; $city2 = $city3; $treeview .= "<ul style=\"display:none;\">"; } if ($item3) { $treeview .= "<li>".$item3."</li>"; $item2 = $item3; } } } $treeview .= "</ul></li></ul></li></ul></li></ul>"; There are 3 lines of code that I have changed from when it works: Code: $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$state3."</a></div><br />"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$county3."</a></div><br />"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"><a href=\"#\" style=\"margin-left:20px;\">".$city3."</a></div><br />"; From the above 3 lines, the only thing I did which seemed to break the code was move the </div> from in front of <a href ...> to after </a> So the original lines (where it worked) looked like: Code: $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"></div><a href=\"#\" style=\"margin-left:20px;\">".$state3."</a><br />"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"></div><a href=\"#\" style=\"margin-left:20px;\">".$county3."</a><br />"; $treeview .= "<li class=\"expandable\"><div class=\"hitarea expandable-hitarea\"></div><a href=\"#\" style=\"margin-left:20px;\">".$city3."</a><br />"; EDIT: Ok... so not everything works in the other browsers either. Basically if I hit refresh with the new code, then collapse and expand seem to work in reverse.... So not sure how to correct this, but any help would be appreciated... Here is what it looks like (Screen shots): Working Properly in FF After a refresh in Firefox (This is after hitting collapse) Working Properly in IE6 (Before making the changes mentioned above) Not Working in IE6 The site is not currently accessible which is why I'm including screen shots. However, if you need to see them, let me know and I will make it live.... Heading out now, so was trying to get a post up at least before I left... Thanks.. if you need further information or additional code, let me know. Any help would, of course, be appreciated. I am working on this website babeside dot be Everything is going as I want it in all browsers, except IE. When opening the website in IE, and selecting a babe, the babe-part is shown waaaaay underneath all the other parts of the site. Can anyone help me how to fix this? Please help! I've got two rounded boxes one is contained in the other. If the innerbox grows, the outer box should grow with it. Firefox does a great job and grows with it but IE7 doesn't grow, any help would be greatly appreciated. here's the CSS i've used for IE: Code: /* first rounded box */ /* images are set in the index.php */ /* height and width details */ .rbtop div, .rbtop, .rbbot div, .rbbot { width: 100%; height: 14px; font-size: 1px; } /*.rbroundbox { width: 60em; margin: auto; background-color: #37a5f0;} */ .rbroundbox { position: absolute; top: 15px; width: 800px; margin: 5em 0 0 2em; background-color: #37a5f0; } .rbcontent { margin: 0 14px; min-height: 570px; height: 100%; } /* EOF first rounded box */ /* second rounded box */ /* images are set in the index.php */ /* height and width details */ .rbtop2 div, .rbtop2, .rbbot2 div, .rbbot2 { width: 100%; height: 24px; font-size: 1px; } /*.rbroundbox { width: 60em; margin: auto; }*/ .rbroundbox2 { position: absolute; top: 5px; width: 577px; margin: 9.5em 0 0 12em; background-color: #9cd5f0;} .rbcontent2 { margin: 0 14px; min-height: 375px; } /* EOF second rounded box */ here's the html i've used: Code: <body> <div class="rbroundbox"> <div class="rbtop"><div></div></div> <div class="rbcontent"> <div class="rbroundbox2"> <div class="rbtop2"><div></div></div> <div class="rbcontent2"> <p><?=$content?></p> </div><!-- /rbcontent2 --> <div class="rbbot2"><div></div></div> </div><!-- /rbroundbox2 --> </div><!-- /rbcontent --> <div class="rbbot"><div></div></div> </div> <!-- /rbroundbox --> </body> Surprise, surprise... [edit]link removed...[/edit] In FF the list of links that represent the toon archive are dispayed as two columns just like I want, but IE isn't performing properly, showing it as one list right under the other... [note] The CSS is in the head, I haven't exported to a seperate file sheet yet since it's still in development. [/note] Alright.. I'm having a hard time trying to get this to work in the various browsers. Essentially what I'm doing is creating a navigational bar at the top, with one of the links containing a pure CSS drop down menu. Seems to work fine (in IE 6 and FF... need to test in IE7, NS, and Opera. I don't have IE7, so can't test there). I have placed an image above the navigational bar as well. I'm trying to get the navbar centered on the page (can't seem to get it centered. I'm also trying to make the width of the navbar, say 700px or 80% or whatever.. but as long as it's centered in all the browsers... Any ideas on making this right, or even cleaning up the code? Thanks. Here's the code for the HTML: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <html> <head> <title>Page Title</title> <link rel="stylesheet" type="text/css" href="menu5.css" /> <style> body {background-color:#fdeadc; text-align:center; .container { background-image:url('images/navbar.jpg'); } .clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } .clearfix { display: inline-block; } html[xmlns] .clearfix { display: block; } * html .clearfix { height: 1%; } </style> </head> <body> <div class="logo"> <img src="images/logo.jpg"> </div> <div class="container clearfix"> <div class="navbar"> <ul class="menu5"> <li><a href="#">Home</a></li> <li><a href="#">Company</a></li> <li><a class="drop" href="#">Services<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="#">Why Our Service</a></li> <li><a href="#">Why Our Site</a></li> <li><a href="#">How does it work</a></li> <li><a href="#">Message Analysis</a></li> <li><a href="#">Message Handling</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> <li><a href="#">Trial</a></li> <li><a href="#">Support</a></li> <li><a href="#">Client Login</a></li> <li><a href="#">Partners</a></li> <li><a href="#">Contact Us</a></li> </ul> </div> </div> </body> </html> CSS Code: Code: /* commom style for all browsers */ .menu5 { width:625px; margin:auto; text-align:left; position:relative; padding:0; list-style-type:none; } .menu5 ul { padding:0; margin:0; list-style-type:none; /* for Firefox */ } .menu5 li { float:left; position:relative; } .menu5 li a, .menu5 li a:visited { text-align: left; display:block; text-decoration:none; float:left; padding-right:1em; line-height:2.5em; height:2.5em; color:#dd0b14; } .menu5 li ul { visibility:hidden; position:absolute; left:0; height:0; overflow:hidden; } .menu5 table { margin:-1px; border-collapse:collapse; /* font size for IE5.5 */ } /* fist line style for IE7 and non-IE browsers and the second line for IE5.5 and IE6 */ .menu5 li:hover a, .menu5 li a:hover { text-decoration:underline; border:0; color:#dd0b14; } .menu5 li:hover ul, .menu5 li a:hover ul { visibility:visible; height:auto; background:#fff; border:1px solid #ddd; left:0; top:2.5em; overflow:visible; } .menu5 li:hover ul li a, .menu5 li a:hover ul li a { display:block; font-weight:normal; background:transparent; text-decoration:none; height:auto; line-height:1em; padding:0.5em; } * html .menu5 li a:hover ul li a { width:10em; w\idth:9em; /* hack for IE5.5 */ } .menu5 li:hover ul li ul, .menu5 li a:hover ul li a ul { visibility:hidden; position:absolute; height:0; overflow:hidden; } .menu5 li:hover ul li a:hover, .menu5 li a:hover ul li a:hover { text-decoration:underline; } .menu5 li:hover ul li:hover ul, .menu5 li a:hover ul li a:hover ul { visibility:visible; border:1px solid #ddd; height:auto; background:#fff; } .menu5 li:hover ul li:hover ul li a, .menu5 li a:hover ul li a:hover ul li a { display:block; height:auto; } .menu5 li:hover ul li:hover ul li:hover a, .menu5 li a:hover ul li a:hover ul li a:hover { text-decoration:underline; } I'm confused as to what's causing this... http://www.houndsandme.com/ It looks great in FireFox of course... but in IE6 the #column div is longer than it's supposed to be so that the background of the inner elements doesn't cover it all the way. It's almost like either the padding of the #column div, or the margin of the inner div (but only the last one) is incorrect... Also, have a look at IE7 for some really strange happenings... Make sure you scroll over the nav links Hi. Having some trouble with IE (as per usual) and css. I have a container with the id "text". On a normal page, the styling for an unordered list is to use my own bullet point image and have a margin of 20px (as IE sees fit to hide the bullets off the left edge). However, on my sitemap page, inside the text div, there is a div called sitemap and I have written the style of ul's in this div to have no list-style. Of course in ff and opera this works fine and the lists have no style, but IE persists in using the bullet image. It seems like it's taking the rule: div#text ul { list-style: url(blah blah blah) etc. } to be the only ul styling rule, and anything which contradicts it is ignored: div#text div#sitemap ul { list-style: none; } Any help would be greatly appreciated, Thanks UPDATE: Just fixed it, still haven't a clue as to why it's happening tho. What I did was to say: div#text div#sitemap ul { list-style: url(); } Can anyone enlighten me as to the cause? http://s125392025.websitehome.co.uk/layout.html I'm making a layout, in this layout(as you can see), I have a SubNav and a main body part. Both of those sections, have a header image and a footer image. Well, my body footer image isn't aligning directly with the main body. It's off by about 1 or 2px. I tried using: position:absolute; With a few different types of top, and bottom, but the picture only dissappears. I used the exact same line code for the footer image for the subnav, and it has aligned just fine. Here's the script if it matters. Could anyone help please? PHP Code: <!DOCTYPE html PUBLIC> <html> <head> <title>2 Box Layout Test</title> <style type="text/css" media="screen"> /* Here is the main CSS */ body { background: #FFFFFF; } div { background: #FFFFFF; } h5 { text-align:center; } #mid, #left { top:120px; } #midcontainer { width:400px; margin:0 auto; position:relative; left:35px; top:44px; } #midheader { background:#000000 url(http://img.photobucket.com/albums/v237/The_Nyne/Site/head400.jpg) top left no-repeat;height:30px;z-index:-1; } #midfoot { background:#000000 url(http://img.photobucket.com/albums/v237/The_Nyne/Site/foot400.jpg) top left no-repeat; height:30px; } #leftheader { background:#000000 url(http://img.photobucket.com/albums/v237/The_Nyne/Site/head200.jpg) top left no-repeat;height:30px; } #leftfoot { background:#000000 url(http://img.photobucket.com/albums/v237/The_Nyne/Site/foot200.jpg) top left no-repeat;height:30px; } #midbody, #topbody, #leftbody { border:1px solid black;background: #a3a3a3; } p.top1 { text-align:center; } p.midheadtxt { font-weight:bold; text-align:center; position: absolute; top:-5px; left:180px; } p.leftheadtxt { font-weight:bold; text-align:center; position: absolute; top:-5px; left:50px; } #leftcontainer { width:200px; position:absolute; left:5px; top:150px; } </style> </head> <body> <!--This is the main site header properties--> <div id="top"> <div id="topbody"> <h5>Main Site Header</h5> <p class="top1">This is where the main image, and TopNav will go.</p> </div> </div> <!--This is where the main body text goes for the page--> <div id="mid"> <div id="midcontainer"> <div id="midheader"> <p class="midheadtxt">News</p> </div> <div id="midbody"> <h5>Middle</h5> <p>This is where the main section of the site is located.</p> </div> <div id="midfoot"> </div> </div> </div> <!--This is the subnav area--> <div id="left"> <div id="leftcontainer"> <div id="leftheader"> <p class="leftheadtxt">Sub-Navigation</p> </div> <div id="leftbody"> <p>This is where the subnav is located.</p> </div> <div id="leftfoot"> </div> </div> </div> </body> </html> I've searched around the web for a solution to this problem and have found other with BG display problems, but none that were exactly the same. Others seems to have a persistant problem, while mine only occurs about 20% of the time a page is loaded. Basically I have a div within a div. The inner div has variable content ranging from images, text, and tables, some of which are floated. The outer div has a superfish style menu in it. The height of the inner div is set to 100% to expand with the content within, and the outer div height is set to 100% to expand along with the inner div. Basically, two kinds of errors appear at random with IE. 1) a thin line of the outer div background color is missing at the bottom of the div just about corners rounded with RUZEE.ShadedBorder, or 2) a larger block of the background is missing just above the rounded corners. It only happens sporatically in IE, and usually pressing Reload fixes the problem. These divs are also enclosed within another container div, but its the smaller inner container div that is having the problem. It happens on all of the pages in my site about 20% of the time they are loaded up. Does anyone know why I'm having this problem? Any help is greatly appreciated! Here are two images of what I'm talking about followed by my CSS for those two divs. http:// i1093.photobucket.com/albums/i428/kan3xiao/Clipboard01.jpg http:// i1093.photobucket.com/albums/i428/kan3xiao/Clipboard02.jpg (remove the extra spaces after http://) #outerDiv { background-color: #BBDB56; height: 100%; padding: 1px 20px 23px 5px; width: 860px; margin: 15px auto 0px auto; } #outerDiv, #outerDiv .sb-inner { background: #bbdb56; } #innerDiv { margin: 15px 0px 0px 160px; padding-bottom: 0px; background-color: #fff; height: 100%; } This code for my horizontal drop down menu works great in Chrome & Firefox but is shifted to the right in IE. I would like it to line up properly, like it does in Firefox & Chrome. Anyone have any ideas on how to make it IE compatible? Thanks! Here is the test webpage to see it live: artevaggio.com/test/slideshow_sample.html Here is the CSS source: artevaggio.com/test/artevaggio_style.css There also a snippet of CSS when you view the page source code. Thanks! The code for the problem are below. I have two examples in my html file. One using styles directly and one using styles via a file. The styles are identical. The first div tags that uses styles directly shows correctly, but the other div tags doesn't even show at all - or at least not with 'height' in '.page' set to 'auto'. If it's set for example to 200px that div will show but not the sub ones. This is strange since if using the same styles directly this isn't even a problem at all. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Testing...</title> <link rel="stylesheet" type="text/css" href="test.css" /> </head> <body style="margin: 0px; padding: 0px; text-align: center; background-color: #A0A0A0"> <div style="position: relative; width: 950px; height: auto; margin: 10px auto; padding: 0px; background-color: #FFFFFF"> <div style="position: absolute; top: 0px; left: 0px; width: 950px; height: 150px; margin: 0px; padding: 0px;"> <div style="position: absolute; top: 0px; left: 0px; width: 20px; height: 150px; margin: 0px; padding: 0px; background-color: #C08080;"></div> <div style="position: absolute; top: 20px; left: 30px; width: 890px; height: 130px; margin: 0px; padding: 0px; background-color: #80C080;"></div> <div style="position: absolute; top: 0px; left: 930px; width: 20px; height: 150px; margin: 0px; padding: 0px; background-color: #8080C0;"></div> </div> </div> <div class="page" style="top: 200px;"> <div class="header"> <div class="header-left"></div> <div class="header-image"></div> <div class="header-right"></div> </div> </div> </body> </html> <ul> doesnt work in IE properly? I have problem with IE7 and < code: html: <ul> <li><a href="A.html">A</a></li> <li><a href="B.html">B</a></li> <li><a href="C.html">C</a></li> </ul> If I open site with IE7 pages B.html and C.html works fine, whereas A.html loose its css for navigation (ul a:link etc..) any ideas? code for css: #containerNavigation { margin: 0; float: left; width: 100%; background: #990000; } #navigationHorizontal { zoom: 1; width: 750px; margin: auto; padding-right: 0; height: 35px; } #navigationHorizontal ul { float: right; padding: 0; margin: 0; list-style: none; width: 749px; } #navigationHorizontal li { padding-right: 0; margin: 0; display: inline; } #navigationHorizontal li a { float: left; color: white; text-decoration: none; text-align: center; background-color: #990000; line-height: 35px; margin: 0 0 0 0; padding: 0 25px 0 28px; font-size: 1.2em; } #navigationHorizontal li a:hover { color: #FFF; text-decoration: underline; } I'm working on a website that I'm having issues with in the CSS. I'm fairly new to CSS and I don't know how to get an image banner to show up next to each other. I though with the css in place I could do that, but some how I'm missing where the nav drops down in to the next div which is suppose to be a slideshow type div. The page is at ukindesigns.com/EBB/ebb.html and the style sheet can be found at ukindesigns.com/EBB/CSS/style.css Thanks, Franky I am creating a flyout menu with css that uses unsorted lists in its structure. I have each <ul> take a class that defines several style options, such as color, border, etc., as well as a different style when the mouse hovers over. For specific pages, I want a specific <li> entry to retain the hover-over state at all times. How can I do this? Here's my CSS: Code: .menu, .menu ul li { color: #ffffff; background: #000000; } .menu { width: 137px; } .menu ul { width: 83px; } .menu a { text-decoration: none; color: #eee; padding: .1em .1em; display: block; } .menu a:hover, .menu li:hover>a { color: #000000; background: #ffffff; } .menu li:hover{ border-top: 1px solid #000000; } and here's the html Code: <ul class="adxm menu"> <li class="current"><a href="http://www.aplus.co.yu/" title="Digital Work - Non-Design">digital</a> <ul> <li><a href="http://www.aplus.co.yu/">retouching</a></li> <li><a href="http://www.aplus.co.yu/feeds/">manipulation</a></li> </ul> </li> <li><a href="http://www.aplus.co.yu/adxmenu/" title="Design Work">design</a> <ul> <li><a href="#">packaging</a></li> <li><a href="http://www.aplus.co.yu/adxmenu/">print</a></li> <li><a href="http://www.aplus.co.yu/adxmenu/instructions/">motion</a></li> </ul> </li> <li><a href="http://www.aplus.co.yu/wch/" title="Illustrations">illustration</a> </li> <li><a href="http://www.aplus.co.yu/lab/" title="About Me/Contact">about</a> </li> </ul> </div> I want the first <li> to retain the hover state style properties at all times when on this page to indicate that the user is on the "digital" page. Is there any way to do this? This is driving me crazy and I can't figure it out. I have a "content" div that is a container for 2 other div's (a sidebar and a main content area). For some reason it isn't rendering in the proper place; it's rendering at the top of the page instead of under the navigation (if I don't assign a height to it it doesn't render at all). It also isn't extending past the end of the other 2 div's to reach the footer. I have tried adding overflow hidden to it but it just makes the other 2 divs not render at all. Any help is greatly appreciated. Here is the HTML and the CSS is below it. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>CSS Portal - Layout Generator</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="wrapper"> <div id="header"> <p>This is the Header</p> </div><!-- /#header --> <div id="navigation"> <ul> <li><a href="#" >Home</a></li> <li><a href="#" >About</a></li> <li><a href="#" >Contact</a></li> <li><a href="#" >Links</a></li> </ul> </div><!-- /#navigation --> <div id="content"> <div id="leftcolumn"> <div class="box_blue"> <div class="box_header_blue">Hello, World!</div><!-- /.box_header_blue --> <div class="box_content_blue"> <ul> <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li> <li>Aliquam scelerisque eros at est lobortis eget adipiscing felis sodales.</li> <li>Sed faucibus hendrerit ante, vitae volutpat tellus suscipit sit amet.</li> <li>Quisque rutrum arcu non ipsum fringilla dapibus.</li> <li>Aliquam aliquam arcu sit amet nisi viverra facilisis.</li> </ul> </div><!-- /.box_content_blue --> </div><!-- /.box_blue --> </div><!-- /#leftcolumn --> <div id="main"> <p>This is the main content</p><br /><br /> <p><a href="layouts/121836.htm"> <img border="0" src="layouts/html.png" width="16" height="16"> HTML File</a></p> <p><a href="layouts/121836.css"> <img border="0" src="layouts/css.png" width="16" height="16"> CSS File</a></p> <p>To download, right click and choose 'Save Target as...'</p> <p> </p> <p>If you use one of these layouts, please consider linking to CSS Portal.<br /> http://www.cssportal.com</p> </div><!-- /#main --> </div><!-- /#content --> <div id="footer"> <p>This is the Footer</p> </div><!-- /#footer --> </div><!-- /#wrapper --> </body> </html> Code: * { padding: 0; margin: 0; } html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } /* remember to define focus styles! */ :focus { outline: 0; } /* remember to highlight inserts somehow! */ ins { text-decoration: none; } del { text-decoration: line-through; } /* tables still need 'cellspacing="0"' in the markup */ table { border-collapse: collapse; border-spacing: 0; } a{ text-decoration: none; color: inherit; } ul { list-style: none; } body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; background: url('images/bg.png') fixed; } p { padding: 10px; } #wrapper { margin: 0 auto; width: 1000px; } #header { color: #333; height: 200px; background: url('images/header.png') fixed; } #footer { height: 100px; clear: both; color: #333; background: #6B6659; } #navigation { float: left; width: 1000px; height: 35px; color: #333; background: #6B6659; background: #b5bdc8; /* old browsers */ background: -moz-linear-gradient(top, #b5bdc8 0%, #828c95 36%, #28343b 100%); /* firefox */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b5bdc8), color-stop(36%,#828c95), color-stop(100%,#28343b)); /* webkit */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b5bdc8', endColorstr='#28343b',GradientType=0 ); /* ie */ line-height: 35px; } #navigation li { display: inline; float: left; padding: 0 10px; color: #dddddd; } #content { background: #f6f9fa repeat; color: #545454; margin: 0 auto; box-shadow: 2px 0px 3px rgba(0,0,0,.8), -2px 0px 3px rgba(0,0,0,.8); -moz-box-shadow: 2px 0px 5px rgba(0,0,0,.8), -2px 0px 5px rgba(0,0,0,.8); -webkit-box-shadow: 2px 0px 3px rgba(0,0,0,.8), -2px 0px 3px rgba(0,0,0,.8); position: relative; } #leftcolumn { color: #333; background: #EBE3CD; width: 200px; float: left; padding: .5em; } #main { color: #333; background: #fff; width: 770px; float: right; padding: 8px; } .box_blue { -moz-border-radius: 1.2em 1.2em 1.2em 1.2em; -moz-box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.6); margin: 1.6em 0; } .box_header_blue { background-color: rgb(23, 71, 115); color: rgb(255, 255, 255); font-weight: bold; line-height: 3em; text-align: center; font-size: 1.2em; -moz-border-radius-topleft: 1.2em; -moz-border-radius-topright: 1.2em; border-right: 1px solid rgb(0, 0, 50); border-width: 1px; border-style: solid; border-color: #86B1E3 rgb(0, 0, 50) rgb(0, 0, 50); text-shadow: 1px 1px 1px rgb(16, 16, 16); background-image: -moz-linear-gradient(center top , rgb(45, 90, 141), rgb(71, 93, 167) 50%, rgb(43, 75, 128) 51%, rgb(45, 93, 138)); } .box_content_blue { padding: .5em; background: -moz-linear-gradient(top, #f1f1f1, #fff 75%) #fff; display: inline-block; border-right: 1px solid rgb(0, 0, 50); border-width: 1px; border-style: solid; border-color: rgb(152, 208, 237) rgb(0, 0, 50) rgb(0, 0, 50); -moz-border-radius-bottomleft: 1.2em; -moz-border-radius-bottomright: 1.2em; } .box_content_blue li { padding: 10px 0; border-bottom: 1px dotted #cccccc; } |