Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 10-21-2008, 02:00 PM html>body tag
Junior Talker

Posts: 1
Name: Jordan
Trades: 0
Hi all.

I'm working on a website for a client. I have to work some "ie hacks" because of problems with div's etc...

I have a div that in firefox shows padding-top 5px attributes, but in ie the div box does not show padding on the top. I tried messing with the margin instead and it still shows in firefox but not in ie...

So... I figured I would use the "html>body" tag in css to adjust the padding-top attribute only in IE.. because there is already a "margin" above the div in firefox..

When doing this, firefox gets bumped down... I thought that if I used this tag it would only apply to ie, and html>body would only be read by firefox, not giving it the margin.

here is what I have:

<!-- #box_left {
background: #FFFFFF;
border: 0px solid orange;
float: left;
text-align: left;
width: 350px;
padding-top: 5px;
}

html>body #box_left {
background: #FFFFFF;
border: 0px solid orange;
float: left;
text-align: left;
width: 350px;
padding-top: 0;
}-->

HELP!
systemaatix is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-21-2008, 02:32 PM Re: html>body tag
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
First of all, IE6 and below choke on child selectors like that.
You should be using conditional comments coupled with separate CSS files to 'fix' IE's bad behavior rather than using hacks - which will almost always come back to bite you.

Maybe if you showed us ALL the code, or gave us a URL so we could see it, we could ferret out the REAL problem.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to html>body tag
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.72137 seconds with 12 queries