CSS - Safari Css Issues
Hi.
I just discovered that my site has issues in Safari. Everything is fine in FF. Take a look in safari: bestplaceon.net. 1. Gallery thumbnails are all over the layout. 2.Right upper corner Google Plus is gone. 3.Text size is to big for Safari I have tried different ways to fix this problem but without success. Every help would be nice. Thank you! Similar TutorialsHey...this may possibly be a dumb question; I'm still pretty much a complete n00b at HTML/CSS and this is only the second site I've really tried to code. I haven't tried to deal with cross-browser compatibility in IE yet so I'm sure it looks completely whack there, but I've been surprised by issues I've been having between FF, Safari, and Opera -- it was my understanding that those three browsers read things pretty much the same. Basically, the site has a bunch of horizontal dropdown menus (uls with li:hover functions). Here's the relevant code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head><title>Star Trek: Andromeda</title> <link rel="stylesheet" type="text/css" href="http://www.trekandromeda.com/home.css" /> </head> <body> <!-- Menu --> <div id="bg"> <div id="home"><ul id="menu"><li><a href="http://www.trekandromeda.com/home.html"><i><img src="http://www.trekandromeda.com/images/menubutton.png"></i></a> <ul class="marginone"> <li><a href="http://www.trekandromeda.com/home.html">Site Home</a></li> <li><a href="http://forums.sb254.com/index.php?f=686">STA Forums</a></li> <li><a href="http://www.sb254.com/">FSF Home</a></li> </ul></li></ul></div> <div id="news"><ul id="menu"><li><a href="#"><i><img src="http://www.trekandromeda.com/images/menubutton.png"></i></a> <ul class="marginone"> <li><a href="http://www.trekandromeda.com/news.html">Recent News</a></li> <li><a href="http://www.trekandromeda.com/awards.html">Game Awards</a></li> </ul></li></ul></div> <div id="info"><ul id="menu"><li><a href="#"><i><img src="http://www.trekandromeda.com/images/menubutton2.png"></i></a> <ul class="margintwo"> <li><a href="http://www.trekandromeda.com/chat.html">Chat Room</a></li> <li><a href="http://www.trekandromeda.com/odysseyplot.html">STA Plot</a></li> <li><a href="http://www.trekandromeda.com/odysseycrew.html">STA Crew</a></li> <li><a href="http://www.trekandromeda.com/staff.html">STA Staff</a></li> <li><a href="http://www.trekandromeda.com/join.html">Join</a></li> </ul></li></ul></div> <div id="tech"><ul id="menu"><li><a href="#"><i><img src="http://www.trekandromeda.com/images/menubutton.png"></i></a> <ul class="marginone"> <li><a href="http://www.trekandromeda.com/ships.html">Ships</a></li> <li><a href="http://www.trekandromeda.com/equipment.html">Fleet Tech</a></li> <li><a href="http://www.trekandromeda.com/science.html">Science Docs</a></li> </ul></li></ul></div> <div id="andromeda"><ul id="menu"><li><a href="#"><i><img src="http://www.trekandromeda.com/Temp/menubutton2.png"></i></a> <ul class="marginthree"> <li><a href="http://www.trekandromeda.com/races.html">Xenobiology</a></li> <li><a href="http://www.trekandromeda.com/maps.html">Stellar Cartography</a></li> </ul></li></ul></div> </div> </body></html> And the CSS: Code: body {background: #000000; width: 1228px; font-family: Arial;} /* MENU */ #bg {background: #000000; background-image: url("http://www.trekandromeda.com/Temp/blue3.png"); background-repeat: no-repeat; height: 700px; } #home {position: absolute; left: -7px;} #news {position: absolute; left: 207px;} #info {position: absolute; left: 420px;} #tech {position: absolute; left: 725px;} #andromeda {position: absolute; left: 925px;} ul#menu{ position: relative; top: 240px; text-decoration: none; opacity: 100; list-style: none;} ul#menu li { float: left; position: relative; width: 108px; list-style: none; top: auto; left: auto;} ul#menu li a img { position: relative; opacity: 0;} ul#menu li ul { position: relative; display: none;} ul#menu li ul.marginone li { float: left; position: relative; font-variant: small-caps; margin-left: -43px;} ul#menu li ul.margintwo li { float: left; position: relative; font-variant: small-caps; margin-left: 25px;} ul#menu li ul.marginthree li { float: left; position: relative; font-variant: small-caps; margin-left: -50px; width: 240px;} ul#menu li:hover ul { position: relative; display: block; margin-top: -5px; } ul#menu li:hover ul li { float: left; position: relative; padding: 5px; text-align: center; text-decoration: none; color: #ffffff; background: #000000; height: 20px; border: 1px solid #54A2E2; z-index: 1000; } ul#menu li ul li:hover { float: left; position: relative; display: block; color: #000000; background: #54A2E2; border: 1px solid #54A2E2;} /* Links */ a:link {text-decoration: none; color: inherit;} a:visited {text-decoration: none; color: inherit;} a:hover {text-decoration: none;} a:active {text-decoration: none;} In Firefox (and in Opera, although the placement is a little funky) the dropdown menus have an li:hover effect which changes the color of the one which is being hovered over. However, this is not working in Safari and I'm not entirely sure why. Does anyone have any ideas on what I can do to fix this? Thanks! It seems like I must be getting close to what I want. This page displays almost perfectly in Firefox and IE8, as well as most browsers, but not in older IE and Safari. hangemhightaxidermy.com/construction_slides2.htm I would like to eliminate the brown space above the sliding photos, but can't figure out how to do it. After trying all sorts of padding and margin changes, I've decided we can live with it if necessary. The space entered the picture when I used a table to align two unordered lists in a row (one for the text bullets, one for the sliding photos). Before that I just had the sliding photo unordered list and there was no extra brown space. If you view the landscape tab you will see what it looks like with both lists and no table. yikes! My bigger problem is that this whole middle section is shifting far to the right in IE7, IE6, and Safari. I have looked into haslayout stuff, but honestly I'm an old self-taught web dev mom just getting back into design for a family member after being out for 10 years. There's a lot of new stuff!! Fun, but frustrating. Don't laugh too hard looking at my css. I have been using the W3 validators to help, but maybe an experienced person can see my issue. My brain/eyes are kind of glazed over at this point. I'm working on a site and am getting some margin errors in the header. It all is aligned in Chrome, FF, IE8, Safari on Windows, etc... but IE7 or earlier and Safari on mac is not aligning the margins properly. the part that is messed up is what is labeled as desc2 in the header section. It won't left (or even right) align. In the problem browsers, it sends the text off to the center of the header. it would make much more sense if I could show you, but apparently I'm not allowed to post links. anyone have any suggestions? Here is the code section i'm working with: <code>/***** Header ********************/ #header { margin: 0 auto 0; padding: 0; height: 42px; } #desc2 { color: #000000; font-size: 18px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; float: right; margin: 0 290px 10px 0; } #header .wrap { width: 840px; height: 10px; margin: 0 auto 0; } </code> I cannot figure this out. I've tried adding clear: both in several places, I've tried overflow: hidden and I've tried cursing. Nothing works! How can this be fixed so that in IE6 the divs are not staggered vertically?? Code: <div style="height: 38px; margin: 0px; padding: 0px; width: 140px;"> <div style="float: left; height: 38px; width: 38px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="38" border="0"></div> <div style="float: right; height: 38px; width: 102px;">copy</a><br>copy</a></div> </div> <div style="height: 38px; margin: 0px; padding: 0px; width: 140px;"> <div style="float: left; height: 38px; width: 38px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="19" border="0"></div> <div style="float: right; height: 38px; width: 102px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="8" border="0"></div> </div> Hey, I came across this forum and hopefully somebody can help me. Here is my website: http://www.jmuelectricmotorcycle.tk When the page is in firefox, If you page zoom out, the navbar goes under the content instead of staying on the right. I think it has something to do with padding and the sidebar not having enough room so it drops down. When I set the content to 1005 instead of 1000, it works, but there's a giant 5 pixel gap between my side bar and my content container. Also, does anybody know how to style called data from ssi.php in SMF forums? I want my login boxes to look like my main page. Thanks. Here is my css: Code: html { font: normal 12px verdana, arial; background-color: #000 } body { text-align: center } #fw-container { margin: 0 auto; width: 1000px; text-align: left } .hasSidebar #fw-container { width: 1000px; } a, a:visited { text-decoration: none; } a:hover { text-decoration: underline; } /* --- Header --- */ #fw-head { position: relative; height: 196px; background: #242424; } #fw-title { font: bold 26px verdana; letter-spacing: -1px; position: absolute; top: 20px; left: 20px; padding: 0; margin: 0; z-index: 10; } #fw-title a, #fw-title a:visited, #fw-title a:hover { color: #fff; } .fw-logo { width: 760px; height: 196px; position: absolute; } .hasSidebar .fw-logo { width: 1000px; } /* --- Navigation --- */ #fw-mainnavwrap { background: #242424; padding: 10px 20px; font-family: arial; font-weight: normal; border-top: 1px solid #000; border-bottom: 1px solid #000; } #fw-mainnavwrap ul { margin: 0; padding: 0; background: transparent; list-style-type: none; } #fw-mainnavwrap li { margin: 0px 15px 0px 0px; display: inline; } /* --- Content --- */ #fw-bigcontain { width: 760px; float: left; } .fw-paragraph { background: #242424 url('../Waveform/img/bg-p.gif') repeat-x top left; border-bottom: 1px solid #000; padding: 15px 20px 10px; overflow: hidden; } .fw-title { margin: 0px 0px 10px; font: 18px verdana; color: #fff; } .fw-text { margin-bottom: 10px; } /* --- Sidebar stuff --- */ .hasSidebar #fw-sidebar { width: 239px; float: right; font-size: 12px; clear: right; border-left: 1px solid #000; } #fw-sidebar .fw-title a, #fw-sidebar .fw-title a:visited, #fw-sidebar .fw-title a:hover { color: #fff; text-decoration: none; } #fw-sidebar .fw-title { font-size: 1.3em; font-weight: normal; } /* --- Footer --- */ #fw-footer { font: normal 10px verdana, sans-serif; background: #242424; margin: 0px; padding: 11px 0px 1px; color: #999; clear: both; width: 760px; } .fw-footertext { background: #161616; border-bottom: 1px solid #000; border-top: 1px solid #000; margin: 0px; padding: 6px 0px 6px 20px; } Hi, so far I have my website look the same on IE7, (maybe IE6), FireFox, and Opera. Now there is another browser called Safari for Mac! How can I test my website on Safari if I only have a PC? also should I worry on this!? or if my website works on FireFox then it means it will work on Safari as well? regards, Sim085 Hi there, I used to use tables to format my websites. I want to use css now for formatting my site but I have a small problem... When I am on my Windows XP computer with IE6 My Site looks just fine. But when I turn on my Mac and I open the page in Safari it ****s up a little bit. And of course I want my site viewable to al users with al browsers on any platform. This is some of the code I used: Code: body { background-color: #fff; margin: 100px 0px 0px 0px; } .leftside { width: 500px; float: left; border-right: 1px dashed #999; padding: 0px 0px 0px 100px; } .rightside { width: 150; padding: 10px } this is the url of my testpage: www.headradio.net/template/index.php Just take a look how it looks in safari (or firefox) and how it looks in IE6 Thanks Daan 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 I have my webpage coded in HTML 4 and CSS, and everything is valid. It displays perfectly in all browsers, with one exception. In Safari 1.2, the menu background positioning is screwed up. It is supposed to display the b&w image first, then rollover to the color image. Instead, it is displaying the color image, and not repositioning the image so it displays correctly. It works fine in other browsers. any suggestions?? (PS) i'm judging the Safari support by BrowserCam.com, I don't actually have a Mac to test with. And yes, I do need it to work in Safari since this is a class website and we are provided with apple laptops to use. I've got a body of text within a DIV tag. For some reason, if I roll my mouse over the text, the entire body of text changes color as if it were a link. I've double checked to see if there are any open HREF tags but there are none. Any ideas? Safari 1.3 on Mac OSX 10.3.9 if it matters. I've also tested on Netscape, Opera, Firefox and IE and all of these work fine. here be the code: Code: .mainBody { color: #000; font-family: helvetica, arial, "sans serif"; font-size: 12px; text-align: justify; padding-left: 35px; padding-right: 35px; } .mainBody:link, .mainBody:visited { color: #600; text-decoration: underline; } .mainBody:active, .mainBody:hover { color: #996600; text-decoration: none; } .pageLinks { color: black; font-family: helvetica, arial; font-size: 14px; text-align: center; } .pageLinks:link, .pageLinks:visited { color: #960; text-decoration: underline; font-size: 14px; } .pageLinks:active, .pageLinks:hover { color: #960; text-decoration: none; font-size: 14px; } I'm a developer of a PHP forum software, and I've made a CSS emoticons system which has been working fine for several months now. But only recently I've found out that the emoticons don't display at all in Safari. Here's an example of the code I use: http://homepage.ntlworld.com/andy_black/andy/forum/emoticon.htm In Safari only the bottom 3 display, and the images don't animate. The only difference between them all is that the top one has a space on both sides of the emoticon's HTML, while the lower 3 either have only one or no spaces. I've made a fix for the forum which uses this workaround (by replacing one of the surrounding spaces with an character), but this has been met with mixed success (works sometimes, but still doesn't display at all other times), and I'd like a more "elegant" solution if possible. I don't have Safari myself so it's difficult for me to bug test. Can anyone offer any suggestions? I am having trouble trying to work out why on an iphone my css file never gets used. when a user arrives at my site with a screen size <= 1024 i apply a different style sheet using this function - http://www.kelvinluck.com/2006/05/s...ts-with-jquery/. i know this isnt a way of doing it for an iphone as you use user.agent but i am doing it for smaller screens at the same time. Code: <link href="index.css" rel="stylesheet" title="screen" type="text/css" media="screen" /> <link href="css/mobile.css" title="mobile" rel="alternate stylesheet" type="text/css" /> that is how i order my stylesheets in my html. on opera on the iphone the css works fine but its just safari. on android the site works fine. any help would be really grateful thanks in advance ListInventory.com It looks all "squished" on the iPad. Been tasked with finding out why. Worked fine until adding the featured product block on the right yesterday. What did I screw up? It doesn't do this in Safari for Windows. Hi there, currently, my site uses CSS and it works perfectly in FF and IE. But when it comes to Safari, it doesnt seem to pull the CSS up properly, if at all. (www.nsma.com/store) Just wondering if anyone can help/shed light on this. the css file is at store/stylesheet.css. Im offerin payment if u can help. paypal is best for me, let me know Many thanks in advance There's some really strange bug that only happens in Safari If you visit this, and click on any of the links in the left column or even the link to the page itself then the main content of the page get's shifted down. It doesn't make any sense, the document is exactly the same. Could someone enlighten me? Thank you! Hi all, Is there some trick to achieving a nice gradient background in Safari? I have a nice 150x400 red to dark red gradient JPG, and I'm using this code in the body tag of my CSS file: background: url(../images/page_back.jpg) repeat-x #670000; http://www.alexwait.com/Nortonville...ester/main.html When I load the page in Safari, Opportunities has a border around it that is messing up the whole bar. It stinks. What should I use with CSS to get that to go away? EDIT: Fixed title. Is it possible to designate a width in CSS just for Safari on a Mac? I'm using the "first-letter" feature with CSS which shows up fine in IE, but is totally off in Mac's Safari. Any suggestions on a workaround? The following is what I have currently: In main.css file: p.initial:first-letter { font-size: 300%; float: left} In actual page: <p class="initial">Welcome! Hi, I've made a nav menu using nested ULs, Javascript and CSS. Ive made javascript to open and close submenus by changing the CSS display attribute of the submenu between the values 'block' and 'none' Everything works fine until I tested the system in Safari. This is quite a vital part of the site so I could do with some help on getting what seems to be a fine, valid bit of code / functionality ro work in the Mac browser. any ideas? cheers, NK Apologies for posting this in 2 thread - im not sure if this is a javascript or a CSS problem... my html is: Code: <ul class="nav_list"><li><a id="Accessories" href="/store/page3.asp?sup_type=1&t=3&sub_type=3">Accessories</a></li> <li><a id="Books" href="/store/page3.asp?sup_type=1&t=2&sub_type=2">Books</a></li> <li><a id="CD/Vinyl" href="#" onclick="toggle('CD/Vinyl','m_cd/vinyl'); return false;">CD/Vinyl</a> <ul class="sub_nav_list" id="m_cd/vinyl"><li><a href="/store/page3.asp?sup_type=1&t=4&sub_type=15">CD Albums</a></li> <li><a href="/store/page3.asp?sup_type=1&t=4&sub_type=9">CD Singles</a></li> <li><a href="/store/page3.asp?sup_type=1&t=4&sub_type=10">Vinyl Albums</a></li> <li><a href="/store/page3.asp?sup_type=1&t=4&sub_type=16">Vinyl Singles</a></li></ul> </li> <li><a id="DVD/Video" href="#" onclick="toggle('DVD/Video','m_dvd/video'); return false;">DVD/Video</a> <ul class="sub_nav_list" id="m_dvd/video"><li><a href="/store/page3.asp?sup_type=1&t=5&sub_type=17">DVD</a></li> <li><a href="/store/page3.asp?sup_type=1&t=5&sub_type=18">VHS</a></li></ul> </li> <li><a id="Downloads" href="#" onclick="toggle('Downloads','m_downloads'); return false;">Downloads</a> <ul class="sub_nav_list" id="m_downloads"><li><a href="/store/page3.asp?sup_type=1&t=6&sub_type=6">Digital Albums</a></li> <li><a href="/store/page3.asp?sup_type=1&t=6&sub_type=12">Digital Tracks</a></li> <li><a href="/store/page3.asp?sup_type=1&t=6&sub_type=24">Digital Videos</a></li></ul> </li> <li><a id="Memorabilia" href="/store/page3.asp?sup_type=1&t=7&sub_type=7">Memorabilia</a></li> <li><a id="Wearables" href="#" onclick="toggle('Wearables','m_wearables'); return false;">Wearables</a> <ul class="sub_nav_list" id="m_wearables"> <li><a href="/store/page3.asp?sup_type=1&t=8&sub_type=20">Tour Favourites</a></li> <li><a href="/store/page3.asp?sup_type=1&t=8&sub_type=13">Greatest Hits</a></li></ul> </li></ul> my CSS is: Code: /* NAVIGATION MENU CODE */ #nav_wrapper { padding:0; margin:0; /*line-height:0.5em;*/ border-top:solid 1px #333; } #nav_wrapper a { color:#fff; font-weight:normal; display:block; margin:0; padding:3px 6px; background:url(/images/list_arrow.gif) no-repeat right top transparent; } .a_alt { color:#fff; font-weight:normal; display:block; margin:0; padding:3px 6px; background:url(/images/list_arrow_down.gif) no-repeat right top transparent; } #nav_wrapper a:hover { text-decoration:underline; background-color:#BF8F21; } .nav_list, .nav_list_alt, .sub_nav_list { list-style-type:none; padding:0; margin:0; border-bottom:solid 1px #333; border-right:solid 1px #333; } #nav_wrapper li { width:100%; margin:0; padding:0; display:block; } .nav_list { background-color:#818181; } .nav_list_alt { background-color:#A0A0A0; } .sub_nav_list { display:none; background-color:#C49B1F; border:none; } my javascript is: Code: function toggle(menuLink, menu){ //alert(menu + '\n' + menuLink); thisMenu = document.getElementById(menu); thisMenuLink = document.getElementById(menuLink); if (menuLink!=null && menuLink!=''){ if(menuLink!=activeMenuLink){ // replace active submenu, make this one visible // sort out header colour thisMenuLink.style.backgroundColor ='#BF8F21'; //sort out the menu if(menu!=''){ thisMenu.style.display='block'; thisMenuLink.style.backgroundImage = 'url(/images/list_arrow_down.gif)'; if(activeMenu!=''){ document.getElementById(activeMenu).style.display='none'; } activeMenu = menu; } //hide and replace active if(activeMenuLink!=''){ document.getElementById(activeMenuLink).style.backgroundColor ='#818181'; document.getElementById(activeMenuLink).style.backgroundImage='url(/images/list_arrow.gif)'; } activeMenuLink = menuLink; } else { // hide this submenu, make active vars = '' // sort out header colour thisMenuLink.style.backgroundColor ='#818181'; //sort out the menu if(menu!=''){ thisMenu.style.display='none'; thisMenuLink.style.backgroundImage = 'url(/images/list_arrow.gif)'; //document.getElementById(activeMenu).style.display='none'; activeMenu = ''; } activeMenuLink = ''; } } } |