jsmith1981 Posted February 23, 2012 Report Share Posted February 23, 2012 I have a question regarding your CSS Stef if you don't mind or anyone really that fancies answering I really don't mind of course! Ok I have this CSS thats literally from the tutorial: /* Overall Selectors */ body { font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px; color: #333333; background-color: #f9f9f9; } p { width: 80%; } li { /* stands for list item (li) */ list-style-type: none; /* Find out this attributes values */ line-height: 150%; list-style-image: url(../images/arrowSmall.gif); } h1 { /* Could not we really excuse this and leave it within the body? */ font-family: Georgia, "Times New Roman", Times, serif; font-size: 18px; font-weight: bold; color: #000000; } Like so would be left for h1: h1 { font-size: 18px; } Otherwise you are just putting in formatting just for the sake of it when the formatting you are using is already part of the tags appearance. I have the above but like take this one as an example 'font-family: Georgia, "Times New Roman", Times, serif;' we have already used this in the body tag so wouldn't that already be set? Also with this here: 'font-weight: bold;' within the h1 tag specifically this is the default formatting for such a tag anyway, I have probably been reading Andy Burr is it the author of CSS Mastery or some book like that which says keep it as kind of existing as possible. Like don't use formatting that's already there or could be used for something else, I just thought I would ask this wouldn't affect the way it looks if I removed those would it? I just thought I would ask. Thank you and I appreciate any replies, Jeremy. Quote Link to comment Share on other sites More sharing options...
Wickham Posted February 23, 2012 Report Share Posted February 23, 2012 (edited) I have the above but like take this one as an example 'font-family: Georgia, "Times New Roman", Times, serif;' we have already used this in the body tag so wouldn't that already be set? Yes, if it's already in the body style there's no need to repeat it. Also with this here: 'font-weight: bold;' within the h1 tag specifically this is the default formatting for such a tag anyway, I have probably been reading Andy Burr is it the author of CSS Mastery or some book like that which says keep it as kind of existing as possible. Font-weight can be anything from 100 to 900 http://www.w3.org/TR/CSS2/fonts.html#font-boldness and the default weight for the bold style might not suit the font you are using, some need a light "bold" some need a heavy "bold" so you could either style the h1 tag with a suitable font-weight instead of just bold or style a <b>...</b> tag which would then apply the same font-weight to any tag where it was used. So you have options on how to code font-weight. Edited February 23, 2012 by Wickham Quote Link to comment Share on other sites More sharing options...
jsmith1981 Posted February 24, 2012 Author Report Share Posted February 24, 2012 (edited) Yea I think the only way one can tell about this is when you use a plugin like Firebug or something similar to where you can just disable parts of a CSS selector like font-weight and see it's impact on the CSS to see if it's having any affect like that where it's been copied multiple times of a selector that has a parent inheritance I think. I truly appreciate your reply, Jeremy. Edited February 24, 2012 by Jeremy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.