Alternates to throwing around !Important declarations everywhere is to give the
two declarations equal weight. The problem is that the first has two
qualifiers and the second only has one.
Two solutions I tried that worked are:
table.dashboard th{...}
table.dashboard .title{...}
Or
th{...}
..title{...}
I would probably lean toward the first solution depending on other
considerations of the design. If you need are using the .title class in other
elements not in the dashboard table, you can do this.
..title,
table.dashboard.title{...}
And finally with a name like dashboard, is suspect this is a specific element
of your design and maybe unique on a page, if so I would lean toward an ID as
they are much more specific then classes.
table#dashboard th{...}
table#dashboard .title{...}
<table id="dashboard">....</table>
But remember ID's are supposed to be unique to a page.
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
....-----Original Message-----
....From: Deanna Schneider [mailto:[EMAIL PROTECTED]
....Sent: Tuesday, July 26, 2005 7:56 AM
....To: CF-Community
....Subject: Re: Time to get with the program...
....
....You know, the thing that irks me is specificity issues - or my poor
....understanding of them. Say, for example, you have a table, you can
....give it a class and then do all your styling based off the the table
....structure. So, for example, look at this css.
....
....table.dashboard th {
.... text-align: left;
....}
......title {
....text-align: center;
....}
....
....But, say, then you want to apply an existing class to a th within that
....table.
....<table class="dashboard">
....<tr>
....<th class="title">...</th>
....</tr>
....</table>
....
....In my mind, the logic should be that even though there's a class on
....the table, the class on the th is closer to the source - so more
....specific. But, noooooo. The th won't take the title class unless you
....go back to the css and add !Important to the text-align: center spec.
....
....Grrrrrrr.
....
....So, then the choice becomes, do you start flinging around "!Important"
....specs, or do you instead say "screw using the existing html as the
....basis for the css" and start adding classes to everything.
....
....Tis a conundrum....
....
....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:5:166407
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54