![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| CSS CSS styling code help for your website, CSS is like art and what makes your website look professional. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| I would like to define a color in a CSS file and use the definition in many other HTML files such as (using C syntax): #define MYCOLOR #668834 <p><font color=MYCOLOR>Testing</font></p> Thus when I want to change the color globally, there is just the one place where it needs to be changed. Does CSS have anything like this? Dennis Mosherville, Michigan USA | |||
|
| Advertisements |
| | #2 | ||
| "The Mighty Menace" <TheMenace@REMcomcastOVE.net> wrote in message news:LKCdnV44KaVya9rZnZ2dnUVZ_tmdnZ2d@comcast.com. .. >I would like to define a color in a CSS file and use the definition in many >other HTML files such as (using C syntax): > > #define MYCOLOR #668834 > <p><font color=MYCOLOR>Testing</font></p> > > Thus when I want to change the color globally, there is just the one place > where it needs to be changed. This is not how CSS should be used. I am not 100% on CSS but HTML should not use the FONT tag. You set the colours in CSS for different elements i.e. font colour for main body section and font colour for footer section and font colour for navigation section etc. When you then change the colours in CSS they will change globally as mentioned. Do a Google for CSS tutorials. Plenty of reading to be done. Regards Jamie > > Does CSS have anything like this? > > Dennis > Mosherville, Michigan USA > > | |||
|
| | #3 | ||
| Jamie Allison wrote: > "The Mighty Menace" <TheMenace@REMcomcastOVE.net> wrote in message > news:LKCdnV44KaVya9rZnZ2dnUVZ_tmdnZ2d@comcast.com. .. > > I would like to define a color in a CSS file and use the definition > > in many other HTML files such as (using C syntax): > > > > #define MYCOLOR #668834 > > <p><font color=MYCOLOR>Testing</font></p> > > > > Thus when I want to change the color globally, there is just the > > one place where it needs to be changed. > > This is not how CSS should be used. > > I am not 100% on CSS but HTML should not use the FONT tag. > > You set the colours in CSS for different elements i.e. font colour > for main body section and font colour for footer section and font > colour for navigation section etc. > > When you then change the colours in CSS they will change globally as > mentioned. > > Do a Google for CSS tutorials. Plenty of reading to be done. > > Regards > > Jamie > > > > > Does CSS have anything like this? > > > > Dennis > > Mosherville, Michigan USA > > > > Hi Jamie is correct. To change the font color in css just use the color statement. From what you have posted it really does not matter if you are creating in just HTML or VS applying css to web statements is the same. In the header of the page insert the link to the css file. I always use an external file as if you need the same classes on different pages the browser will only download the css file once. If all the statements are in line then the browser needs to download then eachtime and uses more bandwidth. <link href="dennis.css" rel="stylesheet" type="text/css"> Create the file dennis.css Contents of file "dennis.css" x-----------------------------x ..MyColor { color: #668834; } x-----------------------------x using the class <p class="MyColor">Testing</p> -- Good Luck DaveG | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: css, define, language |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I find the programing language? | SteveL | Software Programming | 6 | 06-12-2007 9:24 PM |
| change language ?? | Mogens Nielsen | Windows | 1 | 05-28-2007 10:29 PM |
| a strange language | swailam | Website Reviews And Website Questions | 0 | 05-27-2007 10:14 PM |
| Is Java stronger language then PHP? | mayank | PHP | 6 | 05-04-2006 8:43 PM |
| Featured Websites | ||||
|