Old 11-04-2008, 16:01   #1 (permalink)
agentxcell
Registered User
 
agentxcell's Avatar
 
Join Date: Nov 2007
Posts: 97
css hacks

Hi guys I have my portfolio up in firefox the way I need it can someone help me with the css hacks to get it to show up in IE the same way.....I am new to conditional comments and hacks.

http://www.dfw-consultants.com/staging/ZeroDegrees/

thanks for any help you can give also feedback on the site is welcomed too.
  Reply With Quote
Old 12-04-2008, 02:51   #2 (permalink)
Shiro
shiro
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,610
Dont use hacks, only use conditional comments. Set it up like this:

Code:
<link rel="stylesheet" href="path/to/firefox/stylesheet.css" /> <!--[if IE 6]> <link rel="stylesheet" href="path/to/ie6/stylesheet.css" /> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" href="path/to/ie7/stylesheet.css" /> <![endif]-->

CSS loads in the order in which it appears in the head of the document. By doing this it loads your base stylesheet (firefox) first, then it loads the ie6 and ie7 stylesheets below that, which means that anything set in those stylesheets will take precedent over what was set in the ff stylesheet for those two browsers. So you code your site for firefox first, then go into ie, and make adjustments from what you have using the ie stylesheets.
  Reply With Quote
Old 12-04-2008, 04:00   #3 (permalink)
foolfodder
Senior Member
 
Join Date: Aug 2007
Location: Ross-on-Wye
Posts: 159
I think that you'd probably be better off setting up a separate header div for the header. You can then give the header a height and put the header background image into it, and you won't need to use absolute positioning on the content div any more.

Also, I think that Firefox is adding 40px of padding to the left hand side of the ul, so you should be able to add padding-left: 40px; to the ul style without changing the display in Firefox
  Reply With Quote
Old 12-04-2008, 04:28   #4 (permalink)
foolfodder
Senior Member
 
Join Date: Aug 2007
Location: Ross-on-Wye
Posts: 159
Also, don't use absolute positioning for the div.container. Let it run up against the bottom of the div.content and then give the div.container a margin on the top and left.
  Reply With Quote
Old 12-04-2008, 04:40   #5 (permalink)
agentxcell
Registered User
 
agentxcell's Avatar
 
Join Date: Nov 2007
Posts: 97
So if I give the div.container a margin on the top and left then it will overlap the background image?
  Reply With Quote
Old 12-04-2008, 05:20   #6 (permalink)
foolfodder
Senior Member
 
Join Date: Aug 2007
Location: Ross-on-Wye
Posts: 159
Hi agentxcell,

Ok, you could do it without the header thing. Just add a margin or padding to the top of the div.content.

Personally I'd probably cut the header into two sections, put the top bit in the header and put the bottom bit in the content. Then have a solid dark grey as the background to "Background". You probably don't need most of the background image as it is solid grey.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8