CSS - Cross-browser Issues With Css Design
I have this design:
http://www.thewildlifemuseum.org/designs/25/content.html Code is below. Styles are mostly within the tags. IE 6 is currently the working browser, while Firefox has the obvious problem of being too wide. I really want to be able to put that curve in but won't be able to as it currently is. Any suggestions as to how to fix it? Code: <html> <head> <title>The International Wildlife Museum</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> BODY,HTML {height:100%;} BODY {margin:0; font-family:Arial,Helvetica,sans-serif; font-size:16px; background-color:#D9A156;} #header {text-align:center; background-color:#4A308C; padding:10px; height:144px;} #middle {background:url("images/gradbg.gif") repeat-x; width:100%;} #menu {background:url("images/gradbg.gif") repeat-x;} #footer {} </style> </head> <body> <div id="header"><img src="images/header.gif" alt="International Wildlife Museum: Tucson's Natural History Museum" width="465" height="144"></div> <div style="position:absolute; left:0; top:164px; width:170px; height:467px; z-index:5;" id="menucontainer"> <img src="images/menu/menucontainer.gif" width="170" height="373"> <div style="position:absolute; left:10px; top:15px; width:160px; z-index:30;" id="menutext"> Design<br> Design<br> Design </div> </div> <div id="middle" style="position:absolute; left:0; top:164px; height:370px;"><img src="images/gradbg.gif" width="3" height="370"> <div style="position:absolute; left:764px; top:13px; width:36px; z-index:20;" id="trcorner"><img src="images/trcorner.gif" width="36" height="34" alt=""></div> <div style="position:absolute; left:101px; top:13px; width:699px; border:solid 3px #000000; background-color:#FFFFFF; padding-left:69px;" id="body"> <div id="content"> <span style="font-size:180px;">N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br> N N<br></span> </div> </div> </div> </body> </html> Similar TutorialsHi there folks, Im about to go insane with this one. My site is akamarketing.com and you will notice on the left there is various elements about me & my blog which display fine in IE but the text continues across (without confining to its parent div width specification) in opera and firefox. According to my stats 25% are firefox so I do of course need to fix this issue. The css and html for one broken section is Code: <div align=center style="text-align:CENTER; border:<?=$bordersize ?>px dashed #000000; margin:2px; width:185px; padding:2px; margin-top:2px; margin-bottom:0px; padding 7px; float:left; margin-left:7px; padding-bottom:0px;"> <table border=0 style="border:0px dashed black;"><tr><td style="text-align:left;"><img title="David Callan" style="margin: 0px 5px 0px 0px; padding-top: 0px; border: #000000 1px solid" alt="David Callan" src="http://www.akamarketing.com/images/davesmall.gif" align="left" vspace="0" hspace="0"/>Welcome. I'm <a href="http://www.akamarketing.com/blog/about-dave/" title="Read more about Dave on our blog"><font color="#22229C">Dave Callan</font></a>, a 24 year old SEOer & Web developer from Ireland. I've been doing design, development, seo, ppc, Internet marketing etc. since I was about 15. This site is my canvas!</td></tr></table> </div> Can anyone help me with this? I've tried a couple of things mostly around float properties but no joy. Thanks in advance for any help. On this site http://www.freewaytransmissions.com I am having issues with the spacing on the navigation. The nav is an ul and I used inline css for spacing the links apart, but as you see in Chrome they are spaced correctly, but in IE they are not aligned correctly. If someone can shed some light I'd appreciate it. Thanks. Tom Hi there, I am reposting this question after removing the extraneous items from the site. Basically, I can get things to line up in either IE or FF, but not both, I have managed to solve this with past sites, but can't seem to figure this one out! Currently I have it set so it is correctly displayed in IE: http://www.kohlrbaby.com/vcc/portfolio/portfolio.htm Please, please help me to figure out how to do fixes for this issue, I have been searching online but can't seem to figure it out and am very frustrated! Thanks so much and here is my CSS: body { margin: 0px 0px 30px 0px; padding: 0px 0px 0px 0px; font-family: verdana, arial, helvetica, sans-serif; color: #000000; background-color: #999999; text-align: center; } #title{ margin-top:0px; margin-bottom: 0px; margin-right: 0px; margin-left:0px; position: relative; float: left; clear: left; } #rightBox { border-right: 2px solid #666666; width:625px; padding: 0px; border-top: 2px solid #666666; border-bottom: 2px solid #666666; border-left: 2px solid #666666; margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left:0px; background: #ffffff; } .mainPic { margin-top: -475px; margin-bottom: 0px; margin-right: 0px; margin-left: 30px; position:relative; float: left; clear: left; z-index: 100; } img.pic{ border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; } PS: i know I don't need to have all my margin positions shown (ie: may eventually become margin: 0px), however I have kept it like this until I figure out what my problems are. Hello all, I have a really anoying alignment issues with fire fox and IE. Have a look at the follwoing page in both browsers: http://pfwd.org.uk/style.htm I need to get IE to display what Firefox shows. The four rows on the left hand side (date, date value, number and number value) need to be aligned with the rows Descirption and description value. Please note not all style code is in the external stylesheet external CSS file: PHP Code: body{ background-color:#006699; font-family:Arial, Helvetica, sans-serif; } .main, header, subHeader{/*Positon values that make every thing go inside the main box */ position:absolute; left:100px; } .main, subHeader dbItem{ border: solid 1px #0099CC; } .main, header{ top:125px; left:140px; width:451px; } .main{ height:300px; } .header{ background-color:#0099CC; font-size:12px; font-weight:800; } .subHeader{ height:22px; width:200px; border: solid 1px #0099CC; background-color:#FFCC66; float: left; font-size:10px; font-weight:700; padding: 2px; } .dbHeader{ border: solid 1px #0099CC; background-color:#FFCC66; font-size:10px; font-weight:600; padding: 2px; width: 50px; } .dbItem{ background-color:#FFFFFF; border: solid 1px #0099CC; font-size:10px; font-weight:700; padding: 2px; width:50px; } .dbdescripHeader{ border: solid 1px #0099CC; background-color:#FFCC66; font-size:10px; font-weight:600; padding: 2px; width: 364px; float:right; } .dbdescripItem{ background-color:#FFFFFF; border: solid 1px #0099CC; font-size:10px; font-weight:700; padding: 2px; width:50px; width: 390px; float:right; height:48px; } .link{ font-size:11px; font-weight:700; font-family:Arial, Helvetica, sans-serif; padding:2px; color:#0099CC; text-decoration:none; float:right; } .links{ background-color:#006699; border: 1px solid #0099CC; border-top:1px solid #0099CC; color:#0099CC; text-decoration:none; padding:0 2px; } .link a:hover{ font-size:11px; font-weight:700; font-family:Arial, Helvetica, sans-serif; padding:0 2px; text-decoration:none; color:#FFCC66; background-color:#006699; } br{ margin-top:-15px; } .subsubheader{ border: solid 1px #0099CC; background-color:#FFCC66; float: left; font-size:10px; font-weight:700; padding: 2px; } page file: PHP Code: <!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=utf-8" /> <link rel="stylesheet" href="style.css"type="text/css" /> </head> <body> <div class='main'> <div class='header'>Updates to the site</div> <div style='margin-bottom:20px;'> <div class='subHeader' style='height:22px;'>Search for an update</div> <div class='dbItem' style='left:180px; width: 239px; float:left; height:22px;'> <form name="search" method="post" action="post"> <select name="Year"> <option>Year</option> <option>2005</option> <option>2004</option> <option>2003</option> <option>2002</option> <option>2001</option> <option>2000</option> </select> <select name="Month"> <option>Month</option> <option>January</option> <option>Febuary</option> <option>March</option> <option>April</option> <option>May</option> <option>June</option> <option>July</option> <option>August</option> <option>September</option> </select> <input type="submit" name="Submit" value="Search" /> </form> </div> </div> <div style='margin-bottom:10px;'> <div class="link"><a href='#' class='links'>GO</a></div> <div class='dbdescripHeader'>Description of update</div> <div class='dbdescripItem'>First set of information from the database</div> <div class='dbHeader'>Number</div> <div class='dbItem'>one</div> <div class='dbHeader'>Date</div> <div class='dbItem'>10/01/01</div> </div> <div style='margin-bottom:10px;'> <div class="link"><a href='#' class='links'>GO</a></div> <div class='dbdescripHeader'>Description of update</div> <div class='dbdescripItem' >Second set of information from the database</div> <div class='dbHeader'>Number</div> <div class='dbItem'>two</div> <div class='dbHeader'>Date</div> <div class='dbItem' >10/01/01</div> </div> <div style='margin-bottom:10px;'> <div class="link"><a href='#' class='links'>GO</a></div> <div class='dbdescripHeader'>Description of update</div> <div class='dbdescripItem'>third set of infroamtion from the database</div> <div class='dbHeader'>Number</div> <div class='dbItem'>three</div> <div class='dbHeader'>Date</div> <div class='dbItem'>10/01/01</div> </div> <!-- End on the fly scripts --> </div> </body> </html> URLS css: http://pfwd.org.uk/style.css page: http://pfwd.org.uk/style/htm Can any one help me sus out the alignment issues? thanks pfwd HTML Code: <div id="nav"> <ul> <li class="first"><a title="#" href="#">About Company</a></li> <li><a title="#" href="#">RRR News</a></li> <li><a title="#" href="#">Apartment Communities</a></li> <li><a title="#" href="#">Commercial Properties</a></li> <li><a title="#" href="#">Current Developments</a></li> <li class="last"><a title="#" href="#">Resident Login</a></li> </ul> </div> CSS Code: /*** Main Navigation Styling ***/ #nav { border-top: 1px solid #897409; border-bottom: 1px solid #897409; background:#fff url(../images/nav_off_back.jpg) repeat-x center; height: 29px; } #nav ul{ font-size: 17px; margin:0; float:left; text-align:center; width:100%; } #nav li { display:inline; margin:0; float:left; list-style: none; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; min-height: 27px; height: 27px; line-height:27px; padding:1px 0; } #nav li.first { background:url(../images/nav_bars.gif) left center no-repeat; padding-left:2px; _margin-left:24px; } #nav li.first a, #nav li.first a:link{ border-left:0; } #nav li.last { border-right:1px solid #fff; } #nav li a { color: #000; text-decoration: none; text-align:center; min-height: 27px; height:27px; padding:6px 17px 6px 17px; border-right:1px solid #b49f36; border-left:1px solid #fff; } #nav li a:hover { text-align:center; background: url(../images/nav_on_back.jpg) repeat-y center; color:#fff; min-height:27px; height: 27px; padding:6px 17px 6px 17px; } This code produces a centered horizontal navigation menu in FireFox Mac and IE6 PC. However, in FireFox PC the whole menu is shifted a bit to the right off-center (about 15 px). In IE7 PC, the menu sits on the left and is not centered at all. I am willing to use a browser sniffer to fix the IE7 problem, but I'm not sure what to do for Firefox. The PC and Mac versions of Firefox usually play nice, but not this time. I'd rather not use both a platform AND browser sniffer, but I'm running out of ideas. The addition of a pixel-specific line-height for #nav li { helped some earlier issues, but did not fix them all. i really like the fieldset due to having the title in the middle of the border, but are there any cross-browser issues? also what i'm finding is that if i set background styling. IE sets the background colour to include the legend aswell, whereas Firefox sets the background colour to the confines of the border. Ideas welcome and asked for Effective Alternatives also welcomed Anyone have any recommendations on a good program to check cross browser stuff. I am tired of having to open every browser up to check my sites. Also, anyone know any good links for getting better at coding for cross browser CSS? Thanks! Hi; I don't mind writing straight CSS with a text editor; my big problem is cross-browser compatibility -- getting all those tweaks for everything you do to include ie 5, 6 & 7 (I guess we can drop 5 by now). To that end, I don't object to using an IDE or other tool to develop cross browser CSS. So my question is, what is/are the best resources available to handle the cross-browser issues; from broken box model, etc. ** I know about ie7-js from Dean Edwards, but I don't know how well that works. ** I know about some CSS IDE's like Aptana & Stylizer; but again I don't really know how well they handle these issues. ** And I would like to hope there are some sites out there with total references that tells you everything you need to know about cross browser CSS, though all I've found so far are piecemeal articles; how to handle this or that aspect. So in short, I don't expect one magic bullet (though that would be nice), but I'm looking for pointers to and evaluations of various resources that could be maybe used together to make this problem a little easier. Thanks I am having problem making this cross browser friendly Code: /* Div Structure */ #heading { margin: 0; position: relative; top: -20px; background-color:#0066CC; } #search { float: left; } #img { float:left; } #text { float:right; } #phone { position: relative ; float: right ; top: 15px ; right: 10px } #head { margin: 5px ; padding: 0; height: 195px; background-color: #FDFCFF; border: solid; border-color: #0066CC; border-width: 2px; background-color: #FDFCFF; } #headnav { float: right ; margin: 100px 17px 5px 10px; padding: 0; } #sidebar { float: left ; background-color:#FDFCFF; border-width:2px; border-style:solid; border-color: #0066CC; padding: 10px; width: 170px; margin: 2px; margin-top: 5px; height: 530px ; } #mainpage { float: right; position:relative; width: 730px ; right: -5px; left: -5px; border: solid; border-color: #0066CC; border-width: 2px; background-color: #FDFCFF; margin-top: 5px; } /* Side Bar */ #sidebar h3 { color:black; font-size: 11px; font-weight: normal; letter-spacing: 0.2em; margin: 5px; padding: 0px; text-transform: uppercase; border-bottom:dashed; border-bottom-color:black; border-width: 1px; } #sidebar ul, #sidebar ol { list-style: none; margin: 0; padding: 0; } #sidebar li { margin: 0; list-style:none; padding: 0; font-family:Arial, Helvetica, sans-serif; font-size:12px; } #sidebar a { color: #9999FF; text-decoration:none; } #sidebar a:hover { color: black; text-decoration:underline; } #sidebar div { margin: 20px 0; padding: 0; } /* Header Style */ #head h1 { font-family:Verdana, Arial, Helvetica, sans-serif ; letter-spacing: 0.5em; font-size: 2em; color: black; } #head a { color: black; text-decoration: none; } /* Head Nav */ #headnav a { color: black; text-decoration:none; } #headnav a:hover { text-decoration:underline; } #headnav p { color:black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:0.1em; } /* Main Page */ #mainpage img { padding: 10px; } #mainpage h2 { font-family: Verdana, Arial, Helvetica, sans-serif; color:black; letter-spacing: 0.5em; font-style: bold ; border-bottom: solid; border-bottom-color:#0066CC; border-bottom-width: 2px; } #mainpage p { font-family: Arial, Helvetica, sans-serif; font-size: 12px; } #mainpage li { font-family:Arial, Helvetica, sans-serif; font-size: 12px; } #mainpage h3 { font-family:Verdana, Arial, Helvetica, sans-serif; border-bottom: dotted; border-bottom-color: black; border-bottom-width: 1px ; latter-spacing: 0.2 em; font-size:18px; } #mainpage a { color: #910B2D; text-decoration:none; } #mainpage a:hover { color:silver; text-decoration:underline; } /* Phone */ #phone p { color: black ; font-family: Arial, Helvetica, sans-serif; font-size: 18px ; } /* Heading's */ #heading h2 { color: white; } i have a web site that i am redesigning and the redesign is @ http://cometosandiego.com/weekendvisit/index.php it shows up GREAT in firefox screwed in opera and COMPLETLY out of wack in IE 6 and 7 what to do???? thanks Im not a newbie to CSS but I am still a bit new to hand coding and div positioning. heres the link - http://members.cox.net/tekjock/test/ the body section I want it to be bottom 5px Left 5px right 5px I can get it to look good in firefox but IE it looks like crap. I have tried the above and it does not work. Any suggestions Thanks Hi All Can anyone please tell me where am I going wrong in code below it fairly straight forward, Style switcher works fine. The problem is When I'm using Firefox background image doesn't show but there no problem in IE. why???? Thanks Zed Code: <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript" src="styleSheetSwitcher.js"></script> </head> <body><center> <div id="main">Hello <div id="centerbox">world</div> </div></center></body> </html> css code Code: #main { position: relative; background-image:url(images/Driving_bkg3.gif); background-repeat: no-repeat; height: 100%; left: 5%; } #centerbox { margin: -20% 3% 0 40%; padding: 0%; width: 41%; height: auto; background-color:#C9F; } I was wondering if anyone knows of downloadable software for cross-browser testing (other than downloading all browsers manually). I know there are several websites that offer these features, but I'd like downloadable software as well. It would be even better if it offered some emulators for mobile device browsers as well.... Anyways, just wondering if anyone knows of anything good other than the online web service ones. How does one make a header like this cross browser compatible? It works in most browsers but I noticed in IE8 it renders the header weird. Here is the CSS: Code: .header { position: relative; padding-bottom: 0; z-index: 20; } #banner-top { float: right; line-height: 0; margin: 20px 20px 20px 0px; } .logo { float: left; margin: 0 50px 0 20px; } .logo.image { line-height: 0px; } .logo .plain-text { font-size: 20px; line-height: 30px; font-weight: bold; } .logo #tagline { font-size: 11px; font-style: italic; } #search-bar { float:left; margin-top:25px; z-index:500;} #search-bar #home_search { display: block; height: 40px; margin: 0; padding: 4px; position: relative; width: 595px;} #search-bar #home_search_input { background: none repeat scroll 0 0 transparent; border: 1px solid #C6C6C6; color: #666666; display: inline-block; font-size: 12px; height: 40px; line-height: 14px; padding: 0 10px; width: 480px; } #search-bar #home_search_submit { border: 1px solid #dc5653; background: #fe5d62; /*fallback for non-CSS3 browsers*/ background: -webkit-gradient(linear, 0 0, 0 100%, from(#fe8781) to(#fe5d62)); /*old webkit*/ background: -webkit-linear-gradient(#fe8781, #fe5d62); /*new webkit*/ background: -moz-linear-gradient(#fe8781, #fe5d62); /*gecko*/ background: -ms-linear-gradient(#fe8781, #fe5d62); /*IE10*/ background: -o-linear-gradient(#fe8781, #fe5d62); /*opera 11.10+*/ background: linear-gradient(#fe8781, #fe5d62); /*future CSS3 browsers*/ -pie-background: linear-gradient(#fe8781, #fe5d62); /*PIE*/ repeat scroll 0 0 transparent; border: 0 none !important; color: #FFFFFF; cursor: pointer; display: inline-block; font-size: 16px; font-weight: bold; height: 43px; padding: 0 10px; margin-left: 6px; width: 80px;} Does anybody know how to tweek this code to render the same in all browsers? Freaking IE8! Hello, My pages all validate XHTML 1.0 Strict. My CSS Validates 2.1 ...except when I uploaded it then I get this error fives times: Parse Error opacity=0) Anyway, I thought by creating valid pages most browsers would render them correctly ----WRONGE! It seems IE 6 compresses my pages just enough to make the center column jump down under the two side columns, creating a big hole at the top. In IE 5.5 the pages look like a wild dog completely mangle them. FireFox can't seem to understand Javascript and my picture fader screen is blank and the Nav Bar is always on. Seems IE 7 is the only one who can get it right. Thank goodness for Microsoft! I was wondering how to resolve these problems. Seems I read somewhere that one could create different stylesheets for different browsers and use javascript to run them. I know nothing about javascript except how to paste it in. But I need someway to get my pages to work in FireFox and IE 6 at least. The name of the site is mybelovedangels dot com. Any Suggestions? Thanks Okay, my layout is css, and the problem is with my footer, and bottom links. In mozilla, they look the way i want them to, but for IE, they are positioned too low, and the bottom links are unreadable. Take a look - www.funny-guys.com The Code: #bottomlinks { margin:0px 0px 20px 0px; padding:0px; font-size:10px; color:#999999; text-align:center; div#footer { margin: 0px 0px 12px 0px; font-size:60%; text-align:center; padding:0; } Thanks Okay, I'm about 6 steps into an effort to redo a section of my site... And while I swear I started out using a DIV/CSS based layout that worked in ALL browsers suddenly that is no longer the case. What I'm trying for is a navigation bar that stays fixed to the left... to the right of it are esentially 4 stacked areas: 1) the top header should stay glued to the top. 2) a middle content area that should flex reletive to the things around it 3) the second-from the bottom thing stays glued to the bottom, but has a bottom margin to place it above the footer. 4) the bottom footer should stay glued to the bottom. It works in all of my Mac browsers (Safari, Firefox, IE) as well as Firefox for windows. But IE 6.x for Windows insists on displaying all of the right-side elements way down the page... below the end of the left navigation. I simply can not force it to float/wrap to the right. Here is what I've got: http://digipix.jeffntom.com/TEMPLATE_UI-5.php Ignore the whiz-bang JavaScript stuff displaying the images, etc... and help me figure out what's up with my DIV/CSS? Here is the Div structu html4strict Code: Original - html4strict Code <div id="leftnav"> ...leftnav stuff... </div> <div id="rightbody"> <div id="header"> 1) Right-Top: ...header area... </div> <div id="content"> 2) Right-Middle: ...large image area... </div> <div id="thumbnails"> 3) Right-Lower: ....image thumbnail area... </div> <div id="footer"> 4) Right-Bottom: ...footer area... </div> </div> <div id="leftnav"> Here is the CSS: css Code: Original - css Code #leftnav { margin: 0; padding: 0; position: fixed; top:0px; width: 200px; bottom: 1px; // this locks the div to the browser bottom (minus 1px) float: left; background:#cccccc; valign: bottom; } /* this is a container that holds everything except the left navitation */ #rightbody { /* width: 100%; */ } #header { position: fixed; top: 0px; margin-left: 212px; margin-right: 0px; background: #ffffff; } #content { margin-top: 60px; margin-left: 212px; margin-right: 0px; background: #ffffff; } #thumbnails { position: fixed; bottom: 51px; margin-left: 210px; margin-right: 10px; background: #ffffff; } #footer { position: fixed; bottom: 0px; margin-left: 200px; margin-right: 10px; background: #ffffff; }
I know there are a lot of articles lying around about this problem, but im having trouble with css layout for a site im working on, in IE6.0 the site displays as it should do. in Opera 7.23 + 7.11 the site displays with the main text sitting on the logo for the page, in firefox it displays as it does in opera. I am using includes for the full page with no html in the index.php page, i have tried this without includes bur get the same problems as before. the site addy is: http://www.kptspanishproperties.org.uk any help wpuld be great, also im not using tables just using css for all the layout needed I'm designing a site with a combination of css and tables and I've run into some issues w/IE. I've got some content in a nested table <table id="content"> <tr> <td> Content... </> </> </table> and in my style sheet i have #content{ padding-left:20px; ... } Firefox recognizes this property just fine and displays the table slightly indented, but IE seems to completely miss it. I have figured out a few workarounds, but they end up causing more problems and there are also other thigns that IE has been missing.. Does anyone know what might be causing this? ALSO i have a <div id=divider> inside a td w/css props as width:1px and height:100% and background-color:#000000. again, firefox recognizes this and displays a black line that is the height of the td and 1 px wide, but IE displays a little midget line thats like 10px tall instead of the entire height of the cell. wtf? What do you use for Cross Browser Testing? I just came across BrowserCam ($25 per year) at fundable.org. Do you recommend it? thank you. Dr. Mk. |