The more I work with CSS the more I realize how much I don’t know. I just created
a small web site and this is the first time I see this. When viewed in FF, Safary or Chrome,
no problems, everything works fine but today when I tested it in IE7 some of the fonts are huge, it
looks like somehow some of the fonts are inheriting properties from other elements.
Can someone explain what is going on here and explain a little bit about how inheritance works in IE (or in other browsers)?
Here is the <snip /> to the site I’m currently working on.
Inheritance should work the same in IE as any other browser.
If you don’t specify a CSS property, and the element has no default value, it will inherit its value from the parent element.
For example - there is no default ‘color’ property. If you don’t specify a colour, the browser will use its own default colour (which can usually be changed by the user). So colour is inherited. If you set div#content {color:red;} then all text in <div id=“content”>, including in child elements, will be red unless you tell it otherwise.
Counter example - elements do have default padding and margins. They vary from one element to another (and from one browser to another), so the default margins for <p> are different from <ul>, to take one case. So margins are not inherited. If you set div#content {margin:2em;}, then <div id=“content”> will have a 2em margin all round, but its child elements won’t inherit 2em margins of their own.
fs_tigre, you can click on the little red flag icon to the left of each post if you want moderators to do something with that post. Remove a link like in this case, or because it’s spam, or whatever reason you would like to draw the attention of the moderators to a post. When you report a post, you may also give a reason (which helps us understand why a post is reported), but that is not mandatory.
Thanks for the offer but I think I know whats wrong, I’m missing body{font-size:100%;}. I will try this later and if this doesnt solve my issue I may post the code directly. Thanks a lot.
Off Topic:
fs_tigre, you can click on the little red flag icon to the left of each post if you want moderators to do something with that post. Remove a link like in this case, or because it’s spam, or whatever reason you would like to draw the attention of the moderators to a post. When you report a post, you may also give a reason (which helps us understand why a post is reported), but that is not mandatory.
Oh, I didn’t know that, thanks a lot I will use this feature next time if I ever need to.
I think the bigger problem is that you end your <h1> tag with another <h1> instead of </h1>. IE thinks the heading tag is still open and so everything else is part of the top heading, whereas other browsers seem to have better error correction.
If you’re getting a display that doesn’t look like you think it should, it’s always worth running your site through the W3 validator and trying to get rid of any code errors that come up.
Thank you for your advice. I know the importance of validating but every time I try I get so many warnings that I don’t know where to start, I know I know this should be a must, I will try to make this as part of my process.
Stevie D, did you get the warning “TechnoBear” got or you are like me surfing the web without antivirus (I’m using a Mac, I know I should but…)?
Ignoring warnings because you don’t know what they mean isn’t a good plan … often, like here, it will solve the problem. If you get really stuck with what the error messages mean and you just can’t figure them out, you can always ask here for help!
Stevie D, did you get the warning “TechnoBear” got or you are like me surfing the web without antivirus (I’m using a Mac, I know I should but…)?
I do have antivirus, but a different one to Bear, and it didn’t flag up any problems with the site.
Actually, I don’t have antivirus either - I’m on Linux. WOT flagged the site, but gave no explanation, so I went to McAfee to double-check, as WOT can be pretty hit-and-miss. With both of them giving warnings, I decided discretion was the better part of valour and retreated.
I downloaded my complete site and scanned it and I couldn’t find anything, I also used http://www.unmaskparasites.com to scan it annothing I dont know why McAFee is giving that warning. I will continue looking but I wont post any more here because this is kind of an off topic. I appreciate that you guy told me though.