Forum Moderators: not2easy
The W3C validator is happy (I checked that as I wasn't sure if I was allowed to use P tags inside TD's).
HTML example:-
<table>
<tbody>
<tr>
<td class="reviewtop">
<p class="title">
<a href="http://www.example.com/review1.html">Shiny Widget</a>
</p>
<p class="reviewer">
Reviewed by <i>trillianjedi</i> on 27th November 2005
</p>
</td> CSS code:-
p.title {font-size: 1.3em; padding-bottom: 0; margin-bottom: 0;}
p.reviewer {font-size: 1.0em; padding-top: 1px; margin-top: 1px;}
td.reviewtop{border-top: 1px solid #e3e2e2;}
Any guidance gratefully received...
TJ
- what doctype are you using?
- are you defining a default text size on the
body or enclosing element? td.reviewtop p.title {font-size: 1.3em; padding-bottom: 0; margin-bottom: 0;}
td.reviewtop p.reviewer {font-size: 1.0em; padding-top: 1px; margin-top: 1px;}
td.reviewtop {border-top: 1px solid #e3e2e2;}
I'm guessing you've set a font-size on a containing
div, something like a "main content" sort of div? :) e.g.:
div#content { font-size: 0.8em; } But the table's fonts are all too big in IE. -If- this is the problem, it's just IE not inheriting properly. Stick in a conditional comment for IE:
div#content table { font-size: 1em; } And it makes IE take 1em from the parent (0.8em, so 0.8em * 1em = 0.8em) and presto, it conforms :)
[edit]
Oh, I didn't read the bit about IE7. Oops :)
Umm... may I ask why design for a browser still in beta? Lets say it doesn't work now, and you find some way to hack it so it does, and then by the time the stable comes out, it's rendering it as a standard-compliant browser should, and you didn't need to do any work?
At best, the 'table not inheriting' thing is happening both in IE7 as it does in IE6, and you can just extend your conditional comment from being 5 <= x <= 6, to 5 <= x <= 7 :)
Sorry, I can't help, I haven't bothered to download IE7, and probably won't bother until it's stable :) They're still working out how to render different properties, and I don't see how it's worth it to find solutions for a constantly-changing-how-it-renders browser.
[/edit]
[edited by: Setek at 2:16 am (utc) on Aug. 7, 2006]
What doctype are you using?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Although that's possibly a subject for another thread from me later. I don't know why I'm using that, and don't fully understand the difference between transitional and strict. I'll do some reading up on that - just not had time lately.
TJ
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
(...) I don't know why I'm using that, and don't fully understand the difference between transitional and strict.
The doctype you have chosen is exactly the right one for when you don't really know which doctype to use. ;) It is the most flexible and easiest to design and validate against.
transitional doctypes have certain leniencies towards your code, say maybe allowing the use of the <font> tag, whereas strict basically means that - knuckle down and get it right, because if you don't, you'll fail validation.
Thanks, that summarises it nicely. I'm reading up on this at the moment, I might need to start another thread on it later ;)
The doctype you have chosen is exactly the right one for when you don't really know which doctype to use.
I thought it might be! I still prefer to know why I've decided on something though, so better for me to learn why I'm using it. I may be able to use strict actually.
In my mind I suppose is a question about accessibility and doctypes - is one better than the other? Don't answer that here though - I've posted another thread [webmasterworld.com] in the HTML forum.
TJ