HighDots Forums  

Shouldn't CSS over ride tag attributes?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Shouldn't CSS over ride tag attributes? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Shouldn't CSS over ride tag attributes? - 10-01-2004 , 03:29 PM






Friend mailed.
He told me he's done a table with a 3px wide border defined in CSS, but
the border happened to be present in the table tag too, with 2px width.
When checking in Safari, the border becomes 5px wide.
The question is not "how can I fix this" since he knows how to delete
the attribute in the tag, but he merely wondered if CSS wasn't supposed
to over-ride tag attributes and if Safari made something wrong.
To me, Safari screws up, but I wanted to have this confirmed.
Well?
--
Dan Vendel - *GOF*
Contact: http://www.proformica.com/en/contact.shtml
Formmail tutorial: http://www.proformica.com/en/formmail_tutorial.shtml
Nested tables: http://www.proformica.com/en/nested_table_demo.shtml
SEO: http://www.proformica.com/en/search_...mization.shtml
SE Utility: http://www.proformica.com/en/advanced_web_ranking.shtml
Search Dreamweaver newsgroup: http://www.proformica.com/google.html

Reply With Quote
  #2  
Old   
Al Sparber- PVII
 
Posts: n/a

Default Re: Shouldn't CSS over ride tag attributes? - 10-01-2004 , 03:38 PM






The HTML attribute "border" on a table, will also affect the TD. So a
rule like this should theoretically work:

table {border: 1px solid red;}
td {border: 0;}
--
Al Sparber - PVII
http://www.projectseven.com
DW Extensions - Menu Systems - Tutorials - CSS FastPacks
---------------------------------------------------------
Webdev Newsgroup: news://forums.projectseven.com/pviiwebdev/
CSS Newsgroup: news://forums.projectseven.com/css/
RSS/XML Feeds: http://www.projectseven.com/xml/




Reply With Quote
  #3  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Re: Shouldn't CSS over ride tag attributes? - 10-01-2004 , 03:42 PM



Al Sparber- PVII wrote:

Quote:
The HTML attribute "border" on a table, will also affect the TD. So a
rule like this should theoretically work:

table {border: 1px solid red;}
td {border: 0;}
Ah, so Safari isn't screwing things up? The tag attribute still gives a
border to the cell (<td>) and the CSS gives border to the table itself?
OK. Thanks.

--
Dan Vendel - *GOF*
Contact: http://www.proformica.com/en/contact.shtml
Formmail tutorial: http://www.proformica.com/en/formmail_tutorial.shtml
Nested tables: http://www.proformica.com/en/nested_table_demo.shtml
SEO: http://www.proformica.com/en/search_...mization.shtml
SE Utility: http://www.proformica.com/en/advanced_web_ranking.shtml
Search Dreamweaver newsgroup: http://www.proformica.com/google.html


Reply With Quote
  #4  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Shouldn't CSS over ride tag attributes? - 10-01-2004 , 05:12 PM



.oO(Dan Vendel *GOF*)

Quote:
Ah, so Safari isn't screwing things up? The tag attribute still gives a
border to the cell (<td>) and the CSS gives border to the table itself?
Yep. Additionally tables have a default value for cellspacing and
cellpadding. Usually a border="1" on the <table> tag will lead to a 1px
border around the table, another 1px around the cells and some space
between them.

Micha


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.