CSS - Internal Navigation Not Working In Mac Ie Or Safari
Hi there,
I'm haing a problem getting my navigation to appear correctly in Mac IE 5.2 and Safari 2.0.1. The dates on the right are supposed to pop you down to the date in the central box. It works correctly on a PC, all browsers. I replaced NAME with ID. Thanks for any help or suggestions! http://www.cofc.edu/~finchj/timeline_not_template.html http://www.cofc.edu/~finchj/style_timeline.css Jannette Similar TutorialsHi All, When viewed in Firefox on a Mac, the drop down menu works perfectly. I am having a problem with my navigation when viewed in Safari on a Mac. I am not sure about how things function on a PC. When viewed in Safari, the drop down menu appears unaligned with the buttons it corresponds to. For example, on the following page http://www.oharenoise.org/new/mission.htm when you mouseover "About Us" the corresponding menu shows up under "Home." The other problem (only in Safari, as far as I know) I am having occurs on the homepage, viewed here. When you mouseover "About Us", "Newsroom", "Residential", "School" or "Technical" the drop-down menu appears in front of the Flash slideshow perfectly, until the slide changes pictures and then the menu falls behind the slide. Any idea why either of these issues are occurring? Thanks. If you go to the example site: devbum.com/coded/audven/ The top navigation seems to be pushed upwards in Windows Safari and Google Chrome and not centered like in FF, IE6, IE7, and Opera. I'm not sure why it's doing this though... does it also render differently on Mac Safari? Hi there, I have just made a website using css to pop-out my menus, and they dont seem to work in safari, yet work fine in ie and firefox. The website is overload.net.nz, and the two pop-out tabs are the 'newsletter' tab, and the 'tips' tab. I have used css layers, and is wondering is that is the problem? And I dont have safari to test any changes in, does anyone know of a successful safari pc version yet? Hi, While testing our webpage, we found that in all browsers the CSS menu works fine except in Safari, on browsing the child nodes of the menu. The menu just closes on the second or third select. I would greatly appreciate any help to fix this bug. The CSS code is below. Regards, Sharon. Code : <style type="text/css" media="screen"> /**************** menu coding *****************/ #menu { width: 100%; background: #eee; float: left; } #menu ul { list-style: none; margin: 0; padding: 0; width: 12em; float: left; } #menu a, #menu h2 { font: bold 11px/16px arial, helvetica, sans-serif; display: block; border-width: 1px; border-style: solid; border-color: #ccc #888 #555 #bbb; margin: 0; padding: 2px 3px; } #menu h2 { color: #fff; background: #000; text-transform: uppercase; } #menu a { color: #000; background: #efefef; text-decoration: none; } #menu a:hover { color: #a00; background: #fff; } #menu li {position: relative;} #menu ul ul { position: absolute; z-index: 500; } #menu ul ul ul { position: absolute; top: 0; left: 100%; } div#menu ul ul, div#menu ul li:hover ul ul, div#menu ul ul li:hover ul ul {display: none;} div#menu ul li:hover ul, div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul {display: block;} </style> <!--[if IE]> <style type="text/css" media="screen"> #menu ul li {float: left; width: 100%;} </style> <![endif]--> <!--[if lt IE 7]> <style type="text/css" media="screen"> body { behavior: url(csshover.htc); font-size: 100%; } #menu ul li a {height: 1%;} #menu a, #menu h2 { font: bold 0.7em/1.4em arial, helvetica, sans-serif; } </style> <![endif]--> Hi, I have a simple rollover navigation, which is as follows::
Code: <ul id="nav"> <li><a href="about.html" class="about"></a></li> <li><a href="guestpics.html" class="guestPics"></a></li> <li><a href="staff.html" class="staff"></a></li> <li><a href="webcams.html" class="webcams"></a></li> <li><a href="parties.html" class="parties"></a></li> <li><a href="contact.html" class="contact"></a></li> </ul> Here is the CSS for the about link:: Code: #nav a.about{ background-image:url(images/nav/about_off.gif); width:77px; height:18px; } #nav a.about:hover { background-image:url(images/nav/about_on.gif);} I don't see what I am doing wrong? Can someone help? thanks Hi I have used this drop down navigation as the main navigation on my website, it drops down perfectly in firefox but won't drop down in IE??? Is there something I am missing or could add to make it work?? My sites below and css byronyoga(dot)com byronyoga(dot)com(slash)templates(slash)css(slash)style.css (the style is down the bottom of the css) Thanks. I dont understand what I am missing, the menu is suppose to be a drop down menu (and suppose to be horizontal, but i havent got that far yet) but its not dropping, its displaying everything? I would appreciate any help on making it work correctly, thanks much! -Sean nav_style.css file: Code: body { font-family: Arial, Helvetica, sans-serif; } #nav { width: 200px; font-family: Arial, Helvetica, Sans-serif; } #nav ul { list-style: none; margin: 0; padding: 0; } #nav li { border-bottom: 1px solid #ed9f9f; } #nav li a:link, #nav li a:visited { display: block; padding: 5px 5px 5px 0.5em; border-left: 12px solid #711515; border-right: 1px solid #711515; background-color: #b51031; color: #ffffff; text-decoration: none; } #nav li a:hover { background-color: #711515; color: #ffffff; } #nav ul ul { margin-left; 12px; } #nav ul ul li { border-bottom: 1px solid #711515; color: #ffffff; } #nav ul ul a:link, #nav ul ul a:visited { background-color: #ed9f9f; color: #711515; } #nav ul ul a:hover { background-color: #711515; color: #ffffff; } and here is the head_nav.php file: Code: <?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?> <!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>?</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="css_inc/nav_style.css" /> </head> <body> <div id="nav"> <ul> <li><a href="#">Services</a> <ul> <li><a href="#">Cinematography</a></li> <li><a href="#">Photography</a></li> </ul> </li> <li><a href="#">Video</a> <ul> <li><a href="#">Demo Reel</a></li> <li><a href="#">Music Video</a></li> <li><a href="#">Commercial</a></li> </ul> </li> <li><a href="#">Photo Gallery</a></li> <li><a href="#">About Valliant</a> <ul> <li><a href="#">Biography</a></li> <li><a href="#">Resume</a></li> <li><a href="#">Contact</a></li> </ul> </li> <li><a href="#">Links</a></li> <li><a href="#">Home</a></li> </ul> </div> </body> </html> I'm trying to create a tiered vertical navigation menu and I'm nearly there. Everything works correctly in FF but in IE the background-position property on the current menu item fails to position the bullet image. Removing the property displays it but at the margin which is set to 0px. I'm not that savvy with CSS so if there's a better approach to this I'm open to suggestions. Thanks for your help! Open in FF to see how it's supposed to work: Open in IE to see problem. Here's the HTML Code: <div id="Menu"> <div id="nav_header"> <div id="text"> Admissions & Financial Aid </div> </div> <ul id="nav_level_1"> <li id="submenu"><a href="../index.php">Applying to Union</a></li> <ul id="nav_level_2"> <li id="nav_active"><a href="index.php">Types of Admission</a></li> <ul id="nav_level_3"> <li><a href="Transfer.php">Transferring to Union</a></li> <li><a href="Early.php">Early Decission</a></li> <li><a href="Regular.php">Regular</a></li> <li><a href="international.php">International Admission</a></li> <li><a href="aop_heop.php">AOP/HEOP</a></li> <li><a href="Medical.php">Eight-year Medical</a></li> <li><a href="Law.php">Six-year Law</a></li> <li><a href="MBA.php">Five-year MBA</a></li> <li style="line-height:0px;font-size:0px;">*</li> </ul> <li><a href="../Applications.php">Apply Online</a></li> <li><a href="../Forms/index.php">Download Application Materials</a></li> <li style="line-height:0px;font-size:0px;">*</li> </ul> <li><a href="../../FAQs/index.php">Have a Question?</a></li> <li><a href="../../Financial_Aid/index.php">Financial Aid</a></li> <li><a href="../../Events/index.php">Events/Programs & Visiting</a></li> <li><a href="../../interviews.php">Interviews</a></li> <li><a href="../../PerfectSchool/index.php">Tips for College Search</a></li> <li><a href="../../About/index.php">Admissions Staff</a></li> <li><a href="../../AlumniAdmissions/index.php"></a></li> <li><a href="../../Media/index.php"></a></li> <li><a href="/union/admissions/Viewbook/index"></a></li> <li><a href="/union/admissions/Alumni/index"></a></li> <li><a href="../../sample.php"></a></li> <li style="line-height:0px;font-size:0px;">*</li> </ul> </div> Here is the pertinent CSS Code: /* Style for three levels of unordered lists */ #Menu #nav_level_1 { list-style-type:none; width: 200px; margin-left: 0px; padding-left: 0px; margin-top: 0px; padding-top: 0px; background-color: #d2c6aa; line-height:17px; word-wrap: break-word; } #nav_level_2 { list-style-type:none; width: 200px; margin-left: 0px; padding-left: 0px; margin-top: 0px; padding-top: 0px; background-color:#ded4bc; line-height:17px; word-wrap: break-word; } #nav_level_3 { list-style-type:none; width: 200px; margin-left: 0px; padding-left: 0px; margin-top: 0px; padding-top: 0px; background-color:#e5dece; line-height:17px; word-wrap: break-word; } /* End unordered list base styles */ /* To get indented, wrapping, text that's cross browser compatible we need to additionally style the unordered lists and line items under each top <ul> */ #nav_level_1 li { margin-left:20px; } #nav_level_1 li ul { margin-left:-20px; } #nav_level_2 li { margin-left: 40px; } #nav_level_2 li ul { margin-left:-40px; } #nav_level_3 li { margin-left:60px; } #nav_level_1 #nav_active { background-image: url(http://waterfall.union.edu/images/navigation/nav_current.gif); background-repeat: no-repeat; background-position: 4px; background-color: #f2ede1; margin-left:0px; padding-left: 20px; } #nav_level_2 #nav_active { background-image: url(http://waterfall.union.edu/images/navigation/nav_current.gif); background-repeat: no-repeat; background-position: 24px; background-color: #f2ede1; margin-left:0px; padding-left: 40px; } #nav_level_3 #nav_active { background-image: url(http://waterfall.union.edu/images/navigation/nav_current.gif); background-repeat: no-repeat; background-position: 44px; background-color: #f2ede1; margin-left:0px; padding-left: 60px; } #Menu #submenu { list-style-type: circle; padding-left: 0px; margin-top: 0px; padding-top: 0px; background-color:#d2c6aa; line-height:17px; word-wrap: break-word; } #submenu2 { list-style-type:circle; margin-left: 0px; padding-left: 0px; margin-top: 0px; padding-top: 0px; background-color:#ded4bc; line-height:17px; word-wrap: break-word; } I've been at this for hours and hours and I've tried about 50 different ways to get this to work but I'm totally stumped. I've switched the id and class around (in my site's theme.php and template.html) so often that I'm dizzy. I've searched Google and these forums (among others) for help but still, I'm getting nowhere. Maybe my CSS skills are lacking but this seems simple enough (or is it?). Anyway, here's the problem: The CSS (below) just won't work...so what's wrong with it? What am I missing? Code: ul#navigation { list-style: none; margin:0 auto; padding:0; font-family: Arial, Verdana, Serif; font-weight:bold; background:#32478A; text-transform:uppercase; height:25px; line-height:25px; font-size:12px; } ul#navigation li { float:left; margin:0; padding:0; list-style:none; white-space:nowrap; background:none; } ul#navigation li a { display:block; padding:0 15px; text-transform:uppercase; letter-spacing:1px; border:none; color:#fff; } ul#navigation li a:hover, ul#navigation li a:active, ul#navigation li.current_page_item a { color:#242169; background:#fff; } My template.html UL ID looks like this... Code: <ul id="navigation"> {SYS_MENU} </ul> ...and the theme.php CLASS (login link for example) looks like this: Code: <!-- BEGIN login --> <li><a href="{LOGIN_TGT}" title="Click here to log in" class="current_page_item"> Log in</a></li> <!-- END login --> Here's a link to my site: The hover and active bits seem to work but not the CURRENT...which is what I need to fix. Simply put, the current tab at the top of the page doesn't change to reflect what page you're on. I apologize in advance for the coding mess on my site but I'm just now getting around to cleaning things up. I could really use a hand fixing this little monster. Anyone with stellar CSS skills ready to school this lazy bum? Cheers. EDIT: The link (BBCode) above (to my site) doesn't work, so click my homepage in the drop-down menu under my user name. Thanks. Hi, I am designing this site for my Web Design class, and have made the big mistake of working only in FF and not checking IE until the end. The problem is with the Navigation. It is a UL-based Navigation with 5 items. The text of each LI is made "invisible" by using text-indent -9999px in CSS. I have 5 images that have 2 states used for each button. Here is the CSS code for the whole Navigation: #nav {list-style-type: none; margin: 0; padding: 0; background: #fff; width: 934px; height: 62px; position: absolute; top: 0;} #nav a {float: left; height: 62px; text-indent: -9999px; overflow: hidden;} #nav #home a {background: #fff url(home.jpg) no-repeat; height: 62px; width: 194px; float: left;} Here is the CSS that is used for the header and logo: #header {height: 62px; padding-bottom: 231px;} #logo {position: relative; top: 62px; left: 95px;} Here is the XHTML: <div id="container"> <div id="header"> <img id="logo" src="logo.gif" width="740" height="231" alt="Justin Cener Designs Logo 2008" /> <ul id="nav"> <li id="home"><a href="index.htm">Home</a></li> <li id="about"><a href="about.htm">About</a></li> <li id="services"><a href="services.htm">Services</a></li> <li id="portfolio"><a href="portfolio.htm">Portfolio</a></li> <li id="contact"><a href="contact.htm">Contact</a></li> </ul> </div>...............other code follows The above is then repeated for each button and again for each hover state. The problem seems to be in the first part of code. In FF, the buttons make up a full navigation bar and are flush next to each other. This is the way I want it to come out. Then, in IE 7, there are 2 huge differences. 1) The whole Navigation starts on the right of the header logo. 2) Each button drops down maybe 3-5 px from the next (see picture attached) I don't understand why it is like this? Can anyone point me in the right direction? Thanks! Sorry, screen caps don't work here. Hi All, I am building a site that has the following structure for the navigation; Code: <div id="navigation"> <ul id="navlist"> <li class="home"><a href="../index.asp" title="home"><span>home</span></a></li> <li class="aboutus"><a href="../aboutus.htm" title="aboout us"><span>about us</span></a></li> <li class="ourservices"><a href="../ourservices.htm" title="our services"><span>our services</span></a> <ul> <li class="internationalmail"><a href="ourservices_internationalmail.htm" title="international mail"><span>international mail</span></a></li> <li class="worldwidecourier"><a href="ourservices_worldwidecourier.htm" title="worldwide courier"><span>worldwide courier</span></a></li> <li class="worldwidefreight"><a href="ourservices_worldwidefreight.htm" title="worldwide freight"><span>worldwide freight</span></a></li> <li class="storage"><a href="ourservices_storage.htm" title="storage"><span>storage</span></a></li> <li class="publishingservices"><a href="ourservices_publishingservices.htm" title="publishing services"><span>publishing services</span></a></li> </ul> </li> <li class="requestquote"><a href="../requestquote.htm" title="request a quote"><span>request a quote</span></a></li> <li class="contactus"><a href="../contactus.htm" title="contact us"><span>contact us</span></a></li> </ul> </div> The main LI is horizontal, and the containing UL, LI is a vertical dropdown. The seperate CSS file does the image replacements on the <a> and hides the text within the <span>, usual stuff. The nav works great, with the graphic rollovers etc. The rollover, again, standard way of doing it, background: url(<FILE>) no-repeat top left; and the a:hover rollover is a background: bottom left;. Edit: Just noticed that I can't link to the full site that I have uploaded for preview. What I want to do, is when the user roll's over any of the items within the sub-navigation, it keeps the main Services navigation link rolled over also. The only way I could think of doing this, and relatively simply, would be to use JavaScript, but wanted to explore any other CSS ways of doing this. For example, is it possible to change a style of another class, from another? Your help would be much appreciated! I was wondering what is best to use? I don't mean standard internal CSS that is hard coded but I would use PHP to build a template before it is spat out to the browser and it would make an external css file into part of the client side source code. I think this would be more efficient for rendering purposes than linking to external CSS files in a document? Any thoughts? It would also help us in building our cacheing engine. so... having this problem where i have some css styles applied to form inut boxes, and one of them asks for the user to input his/her email address. IE, thinking it's being helpful, is overriding my nice green background with an ugly yellow background. I've done some testing, and if i put the word "email", "e_mail", "e-mail", or even "mail_e" in either the html text NEXT to the blank, or in the name of the INPUT tag, IE assumes i want it to be yellow. any way of overriding this? CSS: Code: .inputBox { border: 1 solid black; background-color: #bcdd4a; font-size: 12; width: 200; height: 16; color: #145e16; font-weight: bold; } HTML: Code: <td valign=top>E-mail:</td> <td valign=top><input type="text" class="inputBox" name="emailAddress" size=20></td> IE Version: 6.0.2800.1106 LINK: http://www.t-2.biz/contact.php please help, frustration setting in. cheers \\ kfancy Is there a way to only clear floats within an element without affecting any floats defined about and outside the element? example: <div style="float:left;">A</div> <div style="float:right;"> <div style="float:left;">C</div> <div style="clear:both;"></div> </div> I would want the clear to only clear C and not A Here's the template I'm working on: http://dhost.info/justusvizslas/template.php Here's my problem: I'm trying to create a centered, two-column layout with a header and a footer, sort of like the tutorial he http://nemesis1.f2o.org/aarchive?id=7 I've got everything working correctly and it looks fine in IE. However, in FireFox, the container div doesn't automatically adjust its height to be the same as the height of the divs inside. Instead, I have to set the height at a certain number of pixils to even get the container div to show up. When I do that, in IE the container div defaults to the same height as the larger of the two inner divs, but in FireFox the container div just stays at whatever pixil height I specified. That becomes problematic because I don't plan on having all my pagecontent divs with the same height. Any insight will be greatly appreciated. I've been looking at this for hours and haven't gotten it to work like it should. Here's the relevant code too: CSS Code: #container { width:792px; height:50px; margin: auto auto; color:#000000; background-color:#FFFFFF; background-image:url(design/menuimage.gif); background-repeat:repeat-y; } #navigation { width:125px; height:auto; padding:0px; float:left; margin-top:auto; vertical-align:top } #pagecontent { width:667px; height:auto; padding:0px; float:left; margin-top:auto; color:#000000; background-color:#FFFFFF; text-align:center } PHP Code: <div id="container"> <div id="navigation"><?php include "nav.php"; ?></div> <div id="pagecontent"> <br />Some more content here<br /> </div> </div> Again, thank you in advance for any help with this. If you're stumped and think it should work as-is, go ahead and go to the actual template I'm working on (first http link in this post) and look at it in IE and in FireFox to note the difference. Im kinda new in CSS so sorry if this is a noob question Im having trouble making an external stylesheet because for some reason my html is just not loading the .css file. But I also read that an external is a little slower aswel if i'm not mistaken, because it has to read another file. But I'm in the internal stylesheet is working good but I noticed I can't create a new class using the "." before the word. Is there anyway I can create a class using the css inside the html file? hi, i wanted to change a look of form submit buttons a bit and i found out i can do it using inline css, example: Code: <input type="submit" name="subbtn" value="Send" style="background-color: #fbbe2c; width: 120px; font-family: tahoma; font-size: 12px; font-weight: bold; color: #66666;"> but can't figure out how to define it using internal or external css. i tried this: Code: <head> <style type="text/css"> input.btn { background-color: #fbbe2c; width: 120px; font-family: tahoma; font-size: 12px; font-weight: bold; color: #66666; } </style> </head> ... <input type="submit" name="subbtn" value="send" class="btn"> which seems the most correct to me, but it doesn't work. style defined in this way is ignored. i'm sure there is a way to do it, but it seems i don't know the right way. could you help, please? I have a rule called #MainContent. Now I want to change this rule for just one page so I duplicate it but don't add it to the global style sheet but declare the rule for this page only. However this doesnt work the div still changes based on the #MainContent rule in the global css file Hey, I'm a CSS noob, and I'm having some trouble with centering the content of my page. When I have the coding as an internal style sheet the page is centered, but when I put it in an external style sheet it looks the exact same...except for that it's left aligned. All I do is copy and paste it, but it change the layout around? Any tips? I am using the <pre> tag in my application and it works for IE, Firefox, etc... except for Safari. This is what I am using in my css Code: <STYLE TYPE="text/css"> #Pre tags with word wrapping for Mozilla, etc... pre { white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; _white-space: pre; font-family:verdana,arial,sans-serif; font-size:11px; color:#000000; } </style> <!--[if gte IE 5]> <style type="text/css"> pre { word-wrap: break-word; /* IE 5.5+ */ white-space: normal; font-family:verdana,arial,sans-serif; font-size:11px; color:#000000; } </style> <![endif]--> This is how I am using the pre tag in my perl cgi application Code: my $id = $FORM{'id'}; my $query = "Select title, news_story, begin_date, author from su_archives where news_id = '$id'"; $sth = $dbh->prepare($query); $sth->execute(); my ($title, $news_story, $begin_date, $author) = $sth->fetchrow_array; @begin = split(' ',$begin_date); @date = split('-',$begin[0]); $startDate = $date[1].'/'.$date[2].'/'.$date[0]; print "<br><b>$title</b><br><br>"; print "<p><i>$startDate</i><br></p>"; print "<PRE WIDTH=55px style=\"font-family: verdana, arial, helvetica, geneva, swiss, sans-serif;\">$news_story</pre>"; Any Suggestions on how this should be revised for Safari? Thanks in Advance |