# CSS - Changing names of styles

**URL:** <https://forum.kirupa.com/t/css-changing-names-of-styles/265734>\
**Category:** web dev\
**Created:** [July 11, 2008, 6:59pm UTC](https://forum.kirupa.com/t/css-changing-names-of-styles/265734 "2008-07-11T18:59:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiveMeCoffee](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@GiveMeCoffee](https://forum.kirupa.com/u/GiveMeCoffee)\
**Post date:** [July 11, 2008, 6:59pm UTC](https://forum.kirupa.com/t/css-changing-names-of-styles/265734/1 "2008-07-11T18:59:04Z")

</div>

Is it possible to change the names of styles in an eternal .css file and not affect the rest of the site pages…? This, meaning the pages that use that style will still use that style but with the new name.

---

<div class="post-metadata">

**Author:** ![redelite](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@redelite](https://forum.kirupa.com/u/redelite)\
**Post date:** [July 11, 2008, 7:00pm UTC](https://forum.kirupa.com/t/css-changing-names-of-styles/265734/2 "2008-07-11T19:00:41Z")

</div>

Do you mean dynamically changing the style class names? Not quite following you… :look:

---

<div class="post-metadata">

**Author:** ![thats\_all\_folks](https://avatars.discourse-cdn.com/v4/letter/t/e0b2c6/32.png) [@thats\_all\_folks](https://forum.kirupa.com/u/thats_all_folks)\
**Post date:** [July 11, 2008, 7:07pm UTC](https://forum.kirupa.com/t/css-changing-names-of-styles/265734/3 "2008-07-11T19:07:38Z")

</div>

You mean like

.styleOne, .styleTwo { margin: 0px; } you can use a comma to separate the names.

Is that what you mean?

---

<div class="post-metadata">

**Author:** ![GiveMeCoffee](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@GiveMeCoffee](https://forum.kirupa.com/u/GiveMeCoffee)\
**Post date:** [July 11, 2008, 7:25pm UTC](https://forum.kirupa.com/t/css-changing-names-of-styles/265734/4 "2008-07-11T19:25:57Z")

</div>

I’m sorry… I mean if I have a font style named “.large\_red\_text {” in an external .css file and I want to change it’s name to “.large\_blue\_text {” … but I want the actual font to stay the same on all the pages on the site. I just want to change the name in the .css document for my own easy reference.

---

<div class="post-metadata">

**Author:** ![redelite](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@redelite](https://forum.kirupa.com/u/redelite)\
**Post date:** [July 11, 2008, 7:39pm UTC](https://forum.kirupa.com/t/css-changing-names-of-styles/265734/5 "2008-07-11T19:39:01Z")

</div>

You would have to change the class names in the HTML. This is why when your naming your classes, name them something generic.

For example, if your **.large\_red\_text** means you want to put emphasis on that text, then name the class something like **.important\_text** , that way if you change the color or the size, it still makes sense (which is what I’m guessing happened, you had it red but you want to change it to blue). You can always put a short comment above your CSS statement to give yourself a quick reminder of what it’s for.
