navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

RE: Common HTML Validation Errors

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Community >> OutFront Discoveries >> RE: Common HTML Validation Errors
Page: <<   < prev  1 [2]
 
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

(in reply to pageoneresults)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Common HTML Validation Errors - 12/6/2002 19:10:04   
Yep, it' s there... but I did use their override feature to see what the difference between the two would make...

Using CSS isn' t that difficult... although I haven' t ever used the float attribute... I' ll have to give that a try!

While I' ve got you here... in CSS I tend to repeat a lot of things... like font-family, background-color: transparent, etc...

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..?

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to pageoneresults)
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

(in reply to pageoneresults)
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

(in reply to pageoneresults)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Common HTML Validation Errors - 12/6/2002 19:23:23   
So that' s how to make it work!

I couldn' t figure out why my stuff wasn' t cascading like I thought it should... I think it' s time I make friends with the cascade again...

You must have seen some of my CSS files... They' re all up around 8K... eesh!

I also have to look into shorthand... #000 instead of #000000, etc.

After all that, I' ll have to start declaring more styles (for those nasty border and height attributes...) when I transition to a strict DTD... that will make my CSS files even bigger! [:j]

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to pageoneresults)
Page:   <<   < prev  1 [2]

All Forums >> Community >> OutFront Discoveries >> RE: Common HTML Validation Errors
Page: <<   < prev  1 [2]
Jump to: 1





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