|
| |
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Common HTML Validation Errors - 12/6/2002 19:02:23
quote:
There is no attribute " align" on an image (I think this is FP adding to my code...) FP will only add it if you specify that the image is to align left, middle, or right. You can achieve the same effect using css and the float property on images. Stick to the transitional dtd and you' ll still be able to use the image align attribute until you get used to using css. It works, it' s supported by most browsers and it can be a little easier to work with while you learn all the in' s and out' s of css. P.S. Bobby, I' m assuming that you have your DTD in your document and that you are not selecting it from the W3C validator dropdown, is that correct?
< Message edited by pageoneresults -- 12/6/2002 7:04:31 PM >
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Common HTML Validation Errors - 12/6/2002 19:16:34
quote:
If I declare the font-family (for example) in the body, shouldn' t it cascade to all other tags in the CSS? Or do I still have to repeat it for h1, p, a, etc..? According to the theory of the cascade, it should but it does not. The workaround for this is to place this at the top of your style sheet... blockquote, body, div, form, h1, h2, h3, h4, h5, h6, input, li, ol, p, select, td, textarea, tr, ul
{font-family:verdana, arial, helvetica, sans-serif;font-size:13px;}
The purpose of the cascade is to find those elements that have repetition and put the attribute into one rule like that shown above. In my example, I' ve specified 13px as the default font size for that web. I can overide that when I set up my individual rules for each class, for example... p.small{font-size:11px;} <p class=" small" >11px content here</p> Remember, the cascade is your friend. When I first started learning style sheets, I had no clue about the cascade. Once I figured it out, I was able to trim 2-4k from each of my style sheets. That' s a big savings when you have style sheets bordering the 8k range!
< Message edited by pageoneresults -- 12/6/2002 7:36:59 PM >
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Common HTML Validation Errors - 12/6/2002 19:22:48
Here' s another example of using the cascade. I' m going to specify a rule for my p elements like this... p{margin-top:10px;margin-top:10px;line-height:16px;} That will now apply to all <p> elements in my web. Now I' m going to specify classes for the <p> elements... p{margin-top:10px;margin-top:10px;line-height:16px;} p.small{font-size:11px;} p.large{font-size:14px;} What' s happening is the attributes in the rule are cascading to the attributes in my classes for the <p> tag. If I were to do this... p{margin-top:10px;margin-top:10px;line-height:16px;} p.small{margin-top:5px;margin-bottom:5px;font-size:11px;} p.large{font-size:14px;} I can now override the cascade and specify that my margins on my p.small class are now 5px and not 10px as the main rule specifies. Forgive me for not using all the proper terminology, I think it' s sometimes easier to explain this stuff in laymen' s terms and then you' ll be able to tie it all together once you learn.
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|