Computer Webmaster Gaming Console Graphics Forum

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.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > CSS
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

CSS CSS styling code help for your website, CSS is like art and what makes your website look professional.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 1:15 PM   #1
The Mighty Menace
 
The Mighty Menace's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default CSS have #define like C language?

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


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Advertisements
Old 07-01-2007, 1:15 PM   #2
Jamie Allison
 
Jamie Allison's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default CSS have #define like C language?

"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
>
>



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 1:15 PM   #3
Dvae Griffiths
 
Dvae Griffiths's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default CSS have #define like C language?

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
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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




All times are GMT +1. The time now is 11:50 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98