CSS - Need Help Getting Ie To Display The Following Properly...
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. Similar TutorialsHi, im using different styles for my links on one page. my CSS for some links is not working properly in IE6. i have defined some rules for all the links in my CSS but for some specific links when i try to change the link color and the hover effect of the link, it is not effected. the color of the link remains same as default link. what is the problem. here is my css code. a:link { color:#ff8702; text-decoration: underline; font-weight:bold; } a:visited { color:#ff8702; text-decoration: underline; } a:hover { color:#ff8702; text-decoration:none; } .readmore { font-weight:bold; font-size:14px; width:94px; height:35px; background:url(images/read-more.gif) no-repeat; vertical-align:middle; padding:12px 0 0 13px;} .readmore a {color:#000000; text-decoration: none;} .readmore a:hover {color:#000000; text-decoration: underline;} when i assign the "readmore" class to any text, it does not take effect. Please help. Hi, I'm currently trying to write a website that will look like this: http://andrew.estyles.com.au/website.jpg The website will be anchored to the top left of the screen and will stretch 100%. The main content area (light blue) must stretch vertically to fit the content, and the side bar (purple) must stretch to the same height as the main content area. What I want to do is let the user hide the side bar by clicking on a button on it (using Javascript). When they click the button, I want the side bar to shrink to about 10-20px in width (enough so that it's still there and you can click another button on it to show it). When the button is clicked to hide it, I want the main content area to move left and fill in the space where the side bar was (and similarly, I want it to move back to the right when the side bar is expanded) I'm having troubles figuring out the CSS to do this. Here's what I've got so far: HTML: Code: <div id="topBanner">Banner goes here!</div> <div id="menuBar">{{T_MENU}}</div> <div id="main"> <div id="leftBar">Side Bar</div> <div id="content">Main Content </div> </div> CSS: Code: /* GENERAL STYLES */ body { margin: 0px; } img { border: 0px; } /* END GENERAL STYLES */ /* top website banner */ #topBanner { width: 100%; height: 100px; background-color: #CCCCCC; border: 0px solid black; } /* bar containing the menu */ #menuBar { width: 100%; height: 20px; background-color: #666666; border: 0px solid black; } /* container for leftBar and content */ #main { width: 100%; background-color: #0000FF; background-image: url('../images/main_background.gif'); background-repeat: repeat-y; } /* left bar containing quick links etc */ #leftBar { float: left; width: 140px; padding: 5px; } /* main content area */ #content { font-family: Verdana, Ariel, Helvetica, Times New Roman; } Using that code, I get my side bar fine etc, it all works fine - but I'm not sure what I should be doing to hide it (I don't mean I don't know the javascript code to do it, I just mean I don't know what I actually need to modify in the divs). Also, you'll note that I'm using the faux column method described here to put in my side bar if that makes a difference. The image I am using is just 150px (size of my side bar) one colour on the left, and then another colour for the rest of it. So when I shrink the side bar, I need to adjust the background images too. So yeah, if anyone can send me in the right direction I'd appreciate it! Cheers. I just tested my site with IE6 and it's very broken (although it's valid HTML 4.01 strict according to w3.org). Main problem I am having is the links. I have a left navigation box, and a list of links inside it, the links display is set to 'block'. When the user's cursor is on the same line as the link, I want the whole line to change BG color and be clickable. This works now with FF perfectly. In IE your mouse has to be ON the actual link for the background to change color, and there is space on the left of the link block. Here is an example (not my site): http://rmideas.com/menus/menutest/NavToBar.htm The top right menu works like I want it to in FF, but in IE your cursor has to be on 'home'. How can I get this to work properly in both FF and IE? and I have overlapping problems, some code overlaps in one browser but looks fine in another. gday i have a bunch of tables that are only to be shown based on a javascript call, but for some reason, firefox is rendering the space of the table, where as IE 7 isn't.. eg. <table style"display: none;"></table> with a whole bunch of rows in it.. the webpage still loads blank space everywhere, rather than just empty space thoughts? This stylesheet was developed by volunteers (local students) who weren't asked to design for cross-browser compatibility. In FF and Netscape the background CSS 'runs out' before the content does (problematic with black background) and there isn't any space between objects (adjoining columns, text etc.). Because I need to make the fix asap (and I am not well versed in CSS for layout) my options here are a) pay my ISP web team to make the adjustments, b) redesign site templates using tables (which I can do, but I know is regressing) or c) get some specific feedback from you folks. The code does not validate (re. W3C CSS Validator) but I'm not experienced enough in this to know how to fix it. In the long-term, I am definitely looking to improve my knowledge in this area and appreciate your patience with me. I have copied the code below. Many thanks for any feedback, resources, pointers etc. you may be able to provide. body{ background-color: Black; background-position: center; text-align: center; vertical-align: center; margin: 2px; } h4{ font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bolder; color: black; } h6{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7.5pt; font-weight: normal; color: black; } h1{ font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bolder; color: black; text-transform: uppercase; } h2{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bold; color: #8B0000; } div#wrapper{ background-position: center; background-color: #F0F1EB; width: 762px; height: 420px; margin: 0px; border: 1px solid #black; padding: 0 px; } div#top{ background-position: center; background-image: url(../images/top.jpg); width: 760px; height: 123px; margin: 0px; border: 0px; padding: 0 px; text-align: right; vertical-align: top; text-transform: uppercase; } div#toplinks{ background-position: center; width: 634px; height: 15px; margin: 0px; border: 0px; padding: 2 px; float: right; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bolder; text-align: center; color: white; } div#midlinks{ background-position: center; background-color: #F0F1EB; width: 760px; height: 17px; margin: 0px; padding: 0 px; border-bottom: 1px solid #9E9E9E;; border-left: 0px; border-right: 0px; border-top: 1px solid #9E9E9E; } div#midleft{ background-color: white; width: 126px; height: 16px; margin: 0px; padding: 6 px; float: left; border-bottom: 0px; border-left: 0px; border-right: 1px solid #9E9E9E; border-top: 0px; text-transform: uppercase; color: red; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bolder; text-align: right; } div#midleft a, div#midleft a:hover, div#midleft a:visited, div#midleft a:active{ text-transform: uppercase; color: red; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bolder; text-align: right; text-decoration: none; } div#midright{ width: 631px; height: 16px; margin: 0px; padding: 6 px; float: right; border:0px; font-family: Arial, sans-serif; font-size: 11px; font-weight: bolder; text-align: left; color: white; text-transform: uppercase; } div#midright a, div#midright a:hover, div#midright a:visited, div#midright a:active{ font-family: Arial, sans-serif; font-size: 11px; font-weight: bolder; text-align: left; color: #990000; text-transform: uppercase; text-decoration: none; } div#left{ background-position: center; background-color: #F0F1EB; width: 125px; margin: 0px; padding: 7 px; float: left; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; text-transform: uppercase; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 900; text-align: right; } div#left a, div#left a:hover, div#left a:visited, div#left a:active{ text-transform: uppercase; color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 900; text-align: right; text-decoration: none; } div#main{ background-position: center; background-color: White; width: 635px; height: 470px; margin: 0px; padding: 0 px; float: right; border-left: 1px solid #9E9E9E; } div#mainl{ background-position: center; background-color: white; width: 310px; height: 289px; margin: 0px; border: 0px; padding: 10 px; float: left; font-family: Arial, Helvetica, sans-serif; font-size: 9pt; text-align: left; color: black; } div#main2{ background-position: center; background-color: white; width: 317px; height: 450px; margin: 0px; padding: 10 px; float: right; border-bottom: 0px; border-left: 1px solid #9E9E9E; border-right: 0px; border-top: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 9pt; text-align: left; color: black; } div#main1col{ background-position: center; background-color: white; width: 625px; height: 289px; margin: 0px; padding: 10 px; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: black; } div#main1col td, div#mainl td, div#main2 td{ font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: black; } div#main1col a, div#main1col a:hover, div#main1col a:active, div#main1col a:visited { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: #8B0000; text-decoration: underline; } div#mainl a, div#mainl a:visited, div#mainl a:hover, div#mainl a:active { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: #8B0000; text-decoration: underline; } div#main2 a, div#main2 a:visited, div#main2 a:hover, div#main2 a:active{ font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: normal; text-align: left; color: #8B0000; text-decoration: underline; } .container { position: relative; left: 1px; top: 1px;} .text {position: absolute; left: 5px; top: 0px;} .container a, .container a:visited, .container hover, .container a:active {color: #666; text-decoration: none;} .text a, .text a:visited, .text hover, .text a:active{color: white; text-decoration: none;} Hi, all. I'm brand new to CSS and have run into my first speedbump. I've tried searching the forum already, forgive me if I missed a previously posted solution. Today I put together a page at work and it looked correct in IE8 (which is the only browser we can use at work). When I got home, I discovered that it doesn't display properly in ANY other browser. I've validated my code, and just can't figure out what the problem is. (I tried to link to images here of what it should look like versus what it actually looks like, but apparently as a new user I'm not permitted to post URLs. I also don't seem to be able to insert images into this post, so if anyone would like to see the images, I guess I could email them to you.) Can anyone tell me why the DIVs appear to be too long? Thanks in advance for any help. Here is the HTML: <HTML> <HEAD> <link rel="stylesheet" type="text/css" href="comp.css" /> </HEAD> <BODY> <div id="parent"> <div id="left_top"> </div> <div class="bigcontainer" id="right_top"> a very<br>special<br>place<br>on the<br>internet </div> <div class="container" id="left_mid"> additional reading </div> <div class="container" id="right_mid"> tab one | tab two | tab three | tab four | tab five </div> <div class="container" id="left_bottom"> first link<br> second link<br> third link<br> fourth link<br> fifth link<br> sixth link<br> seventh link<br> eighth link<br> </div> <div id="right_bottom"> <p> Lorem ipsum dolor sit amet... </p> </div> </div> </BODY> </HTML> Here is the CSS: body { font-family: sans-serif; font-size: 10px; margin: 0; padding: 0; background-color: #e5e5e5; } div.bigcontainer { font-size: 20px; font-weight: bolder; vertical-align: middle; padding: 20px 20px 0px 0px; text-align: right; } div.container { font-size: 12px; font-weight: bolder; vertical-align: middle; padding: 10px 20px 5px 0px; text-align: right; } #parent { margin: 0px; padding: 0px; position:relative; } #left_top { width: 35%; height: 190px; background-color: #7d7d7d; float: left } #right_top { width: 65%; height: 190px; color: #ffcc00; background-color: #666666; float: right; } #left_mid { width: 35%; height: 35px; color: #ffff99; background-color: #ffd426; float: left; } #right_mid { width: 65%; height: 35px; color: #666666; background-color: #ffcc00; float: right; } #left_bottom { width: 35%; height: 100%; padding: 20px; color: #999999; text-align: right; background-color: #e5e5e5; float: left; } #right_bottom { width: 65%; padding: 20px; color: #666666; text-align: right; background-color: #ffffff; float: right; } I've been seeing people using ul and li tags to make their menus in css. So I've started trying to do the same, here is an example. But obviously here, the buttons are not displaying inline. All of the styles are within the page code itself. I've got a display: inline style on the li tag, but it's still not working? How can I get this to work or is there any other way to get a ul li menu to display this way? 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. 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] 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. 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? 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 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> 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 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? 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; } 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> I am just muddling through tweaking my weblog at the mo - learning as I go. But I have come accross something that I just can't pinpoint the solution for. I was hoping someone here could look at it with a fresh [and more knowledgeable] perspective. I have been googling, reading, researching, experimenting and generally pulling my hair out for about 12 hours now and am still no closer. The problem is that I have a div (with the id of "left bar") which I would like to sit on the left hand side of my page. It displays perfectly in firefox but in IE the whole section sits to the extreme right. Here is the link to the SITE Here is a link to some SCREENSHOTS The code:CSS Code: /*left bar */ #left_bar { float: left; position: absolute; padding-left: 2px; margin: 160px 12em 0px 0px; width: 200px; display: inline; } #left_bar ul { color: #336666; font-weight: bold; text-transform: lowercase; list-style-type: none; margin: 0; padding-left: 1px; } #left_bar ul li { font: italic normal 100% 'Times New Roman', Times, serif; text-align: right; letter-spacing: 0.1em; margin-top: 10%; margin-right: 10%; float: none; padding-bottom: 2px; } #left_bar ul ul { font-variant: normal; font-weight: normal; line-height: 100%; text-align: left; list-style-type: none; margin: 0; padding: 0; } #left_bar ul ul li { font: normal normal 70%/115% 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; letter-spacing: 1px; border: 0; margin-top: 0; padding: 0; padding-left: 8px; } #left_bar ul ul li a { color: #996699; text-decoration: none; } #left_bar ul ul li a:hover { border-bottom: 1px solid #660066; } The code: html Code: <div id="left_bar"> <ul> <li id="calendar"> <?php require( dirname(__FILE__).'/_calendar.php' ); ?> </li> </ul> <ul> <li> <?php require( dirname(__FILE__).'/pophis.php' ); ?> </li> </ul> <br /> <ul> <li> <ul> <li> <?php require( dirname(__FILE__).'/misc.php' ); ?> </li> </ul> </li> </ul> </div> Any thoughts, help, suggestions..... anything...... would be v much appreciated! 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? 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> |