View Single Post
  #1  
Old 08-24-2006, 10:52 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default CSS question / TD tags ?

Greetings -- would a CSS expert help me sort this one out?

I have generaly used valign and align tags, within a TD, such as:

<TD valign="top" align="right">

AND - this always supercedes any alignment class in the CSS file.

I recently installed a new skin (for 4.1.3), and this skin has a "general settings" section, which includes a TD class:

Code:
/* General styles */ --snip-- TD { vertical-align: top; }
"vertical-align" and "valign" do not seem to be the same...

By having a top-level TD class that is vertical-align: top - this kills all valign="bottom" local TD tags. I tried using a local TD tag, such as <TD vertical-align="bottom"> but that did not supercede the global TD tag.

My fix was to make a new class:

Code:
.td-valign-bottom { vertical-align: bottom; }

And assign the class to the TD (as opposed to simply using a local tag modifier). Is there a better way?

If this is "advanced W3C XHTML 1.0 compliance" feature? -- I guess I need to learn a bit more... Is it a BAD THING to use local modifiers to css classes?

Thanks for your comments on this.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote