| | |
Need help getting design to be cross browser
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Basically I coded this site and it looks exactly how I want it too in Firefox but it looks like shit in IE more specifically IE 6, 7 isnt bad. The font is rendering odd and items are not in the same location.
here is my html file
and My CSS file
the dimensions of cc_nav.gif is 325x117
any insight?
here is my html file
HTML and CSS Syntax (Toggle Plain Text)
<!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>Caffeinated Customs</title> <style type="text/css"> <!-- @import url(print.css) print; --> </style> <link rel="stylesheet" href="main.css" type="text/css" /> <!--[if IE]> <style type="text/css"> h1{margin-left:0;} #header{margin-top:10px;margin-left:50px;width:550px;} .title{top:15px;) .nav{margin-top:35px;} </style> <![endif]--> </head> <body> <!--Wrap--> <div id="wrapper"> <div id="header"><!--head--> <div class="title"> <h1>Caffeinated Customs</h1> <h2>Custom Affordable Web Design</h2> </div> <div class="nav"> <ul> <li><a href="#">About</a></li> <li><a href="#">Services</a></li> <li><a href="#">Porfolio</a></li> <li><a href="#">Contact Us</a></li> </ul> </div> </div><!--/head--> <div id="contentw"><!--contentw--> <h3>ABOUT</h3> <div id="content"> <h4>About <span style="font-family:'Times New Roman', Times, serif;font-style:italic;font-weight:600;">Caffeinated Customs</span></h4> <p>Content</p> </div> </div><!--/contentw--> </div><!--/Wrap--> </body> </html>
and My CSS file
HTML and CSS Syntax (Toggle Plain Text)
/* CSS Document */ body{ background:#f0c690 url(cc_bg.jpg) repeat-x; } h1{ font-family:"Times New Roman", Times, serif; font-style:italic; color:#452401; font-size:37.41px; font-weight:300; letter-spacing:-3px; margin-left:-10px; } h2{ font-family:"Times New Roman", Times, serif; font-style:italic; color:#000; font-size:18.71px; letter-spacing:0px; font-weight:600; margin-top:-25px; } h3{ font-family:Arial, Helvetica, sans-serif; font-size:24px; font-weight:400; color:#452401; } #header{ width:500px; background:url(cc_nav.gif) left top no-repeat; position:fixed; left:50px; top:50px; } .title{ position:relative; left:-20px; top:-15px; } .nav{ width:214px; height:200px; background-color:#dfb782; margin-left:32px; border:1px solid #e5bf8c; border-top:0; } .nav li{ list-style-type:none; padding: 2px 0 2px 0; margin-left:-41px; } .nav li:hover{ display:block; width:214px; height:28px; border:1px solid #f2c390; background-color:#c89660; } .nav li a{ color:#452401; font-family:Arial, Helvetica, sans-serif; font-style:italic; font-size:24px; text-decoration:none; padding-left:41px; } #contentw{ width:800px; height:auto; position:absolute; left:450px; top:75px; } #content{ font-family:Arial, Helvetica, sans-serif; border-top:#c89660 4px solid; margin-top:-10px; margin-left:10px; } #content h4{ font-size:24px; color:#bf9867; margin-top:3px; } #content p{ width:650px; background-color:#dfb782; padding:15px; border:1px solid #e5bf8c; margin-top:-10px; font-size:14px; font-weight:600; line-height:20px; font-family:Arial, Helvetica, sans-serif; }
the dimensions of cc_nav.gif is 325x117
any insight?
•
•
Join Date: Mar 2008
Posts: 154
Reputation:
Solved Threads: 19
The fonts look ok to me in IE6 (look in Safari!!! ekk!). You can add a little margin (or anything else you want) where needed for IE6 like this:
Matti Ressler
Suomedia
HTML and CSS Syntax (Toggle Plain Text)
.nav{ width:214px; height:200px; background-color:#dfb782; margin-left:32px; border:1px solid #e5bf8c; border-top:0; _margin-top:40px; }
Matti Ressler
Suomedia
If you want your dreams to come true, the first thing you must do is to wake up....
Suomedia - Dynamic Content Management
Suomedia - Dynamic Content Management
But tags "_anything:" for IE are not valid. I would solve this problem with two css files, if is with one really impossible.
HTML and CSS Syntax (Toggle Plain Text)
<!--[if IE6]> <style type="text/css"> @import "styleie6.css"; </style> <![endif]-->>
Jabber: lio(at)jabbim(dot)sk
Sorry for my English, I am only an autodidact.
Sorry for my English, I am only an autodidact.
•
•
Join Date: Mar 2008
Posts: 154
Reputation:
Solved Threads: 19
If you want your dreams to come true, the first thing you must do is to wake up....
Suomedia - Dynamic Content Management
Suomedia - Dynamic Content Management
Have a look at this. It explains exactly why things look different depending on the browser and what you can do to make things look more cross browser consistent.
I see you have size styles (width, height) and surrounding styles (margin, border, padding) in the same classes and tags.
If you want cross-browser compatibility, do not do this. Make separate nested tags for each kind.
FF puts the surrounding styles OUTSIDE the defined sizes. IE crams them INSIDE.
If you want cross-browser compatibility, do not do this. Make separate nested tags for each kind.
FF puts the surrounding styles OUTSIDE the defined sizes. IE crams them INSIDE.
Last edited by MidiMagic; Mar 22nd, 2008 at 12:35 am. Reason: missingspace
Daylight-saving time uses more gasoline
![]() |
Similar Threads
- Hiring Designer - Web 2.0 style (Web Development Job Offers)
- Interactive Designer - £30k (Windsor) (Web Development Job Offers)
- Lead Web Developer- London - £45k (Web Development Job Offers)
- Wanted Serious And Talented Programmers And Graphic Designers Asap (Web Development Job Offers)
- web design: tables versus divs (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: How to center site using xhtml and css using DW CS3
- Next Thread: Website loading Problem
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






