Welcome to WebmasterWorld Guest from 54.145.208.64

Forum Moderators: not2easy

Message Too Old, No Replies

renaming css

   
10:34 pm on Jan 3, 2010 (gmt 0)

5+ Year Member



How should I be handling depricated css names?

Is there someway to put something like .copyBold = .copy .bold?

I want to rename and cleanup some redunant names but am worried that I just wont be able to do a find and replace in php or htm code on every page

Is there someway in the .css document to tell a class to use a different class?

12:00 pm on Jan 4, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Doob

Could you post up a little example of how a couple of lines of HTML and CSS look?

You can declare the same properties for classes like this:

.copy, .bold {font-weight:bold;}

...but without seeing the CSS it's hard to say if this is what you are looking for

7:04 am on Jan 9, 2010 (gmt 0)

5+ Year Member



I did a bunch of cleanup to my css but am still relying on .copyBold and .copyBoldWhite

This works
<span class="copy bold">this makes it bold</span>

This works
<span class="copy white">this makes it white, but not bold</span>

This doesn't work
<span class="copy bold white">this makes it white, but not bold but I think it should make it copy, bold and white! #*$!</span>

.white {color:#ffffff;}
.bold {font-weight: 800;}
.copy
{
font-family: arial, helvetica, san-serif;
line-height: 130%;
font-size:12px;
font-weight: 400;
color: #000000;
}
.copyBold
{
font-family: arial, helvetica, san-serif;
line-height: 130%;
font-size:12px;
font-weight: 800;
color: #000000;
}
.copyBold
{
font-family: arial, helvetica, san-serif;
line-height: 130%;
font-size:12px;
font-weight: 800;
color:#ffffff;
}

3:55 pm on Jan 11, 2010 (gmt 0)

5+ Year Member



.bold is declared before .copy in your css file so .copy is overwriting your previous font-weight declaration

place .bold after .copy in the css file

5:41 pm on Jan 11, 2010 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



doob, I would suggest you read this thread:
[webmasterworld.com...]
Which explains why using class names like "bold" and "white" are bad.
2:04 am on Jan 12, 2010 (gmt 0)

5+ Year Member



Thanks Drag Racer for that tip!