Welcome to WebmasterWorld Guest from 54.196.117.47

Forum Moderators: not2easy

Message Too Old, No Replies

renaming css

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

New User

5+ Year Member

joined:Aug 20, 2008
posts:14
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2002
posts:2204
votes: 0


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)

New User

5+ Year Member

joined:Aug 20, 2008
posts: 14
votes: 0


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)

Full Member

10+ Year Member

joined:Jan 29, 2007
posts:228
votes: 0


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

Senior Member from US 

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

joined:Oct 17, 2005
posts:5003
votes: 20


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)

New User

5+ Year Member

joined:Aug 20, 2008
posts: 14
votes: 0


Thanks Drag Racer for that tip!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members