-
Junior Member
Linking Color In CSS
I have a standard CSS file that I simply edit for the next site I'm building. I'm trying to figure a way to link an individual color to multiple selectors in the CSS.
For example, let's say I have 3 primary colors I'm using and they are being shared between fonts, backgrounds, tables, etc. Thus there could be 30 different places calling out the color code in one style sheet. If for some reason I need to adjust the colors, I must edit every line in the CSS with that color code (30 times).
I'd like to setup the three colors in their own selectors. Then reference the fonts, backgrounds, and tables to those colors. All in the CSS. This way I can easily adjust the three color syntaxes and have all the pages update.
Any thoughts on this?
(And I do realize I can do a find/replace all to change the color codes.)
-
-
I have a web page with some background areas that are dark and need a light colored font for links within that section, but I also have some areas that have a light background and need a dark colored link within the light background, how do I have more than one link color?
-
-
Junior Member
You would assign different elements to the links and then assign the different font colors via CSS. If you're not familiar with CSS, there are tons of tutorials online. Just google it.
One particular site that I often reference is CSS Tutorial
-
-
Junior Member
I now see that you associate with a web development company, thus are probably pretty familiar with CSS. I must be not understanding the question. Can you elaborate?
-
-
Junior Member
you can use multiple selectors seperated by commas
td, .class1, #id1 { background: #fff; } /*define a background for certain selectors*/
h3, .normal, #id2 { color: #000; } /*font color*/
etc.
this is the most centralized you can probably get it.
-
-
i actually learn an advance CSS very useful..
_________________
Indianapolis seo
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Powered by
vBulletin® Version 4.1.9
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by
vBSEO 3.6.0
Copyright 2011 Photoshop Gurus Forum. All rights reserved.