# Solved: setting style color for <div> in .css



## Duckman69 (Jun 26, 2007)

im trying to set a defualt color for div that i can call in hte header for each page changing the div color to the set default, i know and have seen that i can manually implememnt the code for each div value and it works in fire fox, IE, netscape, and opera... but i would like to avoid doing that if possible, any ideas or suggestions would be greatly appreciated...


----------



## MMJ (Oct 15, 2006)

Lol, I didn't understand a thing.


----------



## namenotfound (Apr 30, 2005)

If you want ALL 's to have the same color, just do this in the CSS file.

div {
color: red;
}

Now ALL elements will have a text color of red. Is that what you were asking?


----------



## Duckman69 (Jun 26, 2007)

yea thats what i was asking 404, thank you... can you by chance help me with my div line code the idea was to limit the ammount of text in each page that i can spare by moving things to .css now that im learning it... i currently use the following code...

i cant seem to drawn the line with defualt or no color though... i guess this is kind of stupid i should just use that code and implement it every time i need to for div if you happen to know how i can draw a plain line with it please let me know i had a look on some sites but all the 1's i saw included a color so far... if you dont happen to know it im just gonna use the code in each div line like i should have in the first place i guess... thanks for your response though...


----------



## WendyM (Jun 28, 2003)

If you want the border for every div, then in your css you should do something like:

div {
color: red;
border-bottom:solid medium;
}

If you don't specify a color, the border will be red since that's the color of your div. I'm not sure what you mean by "default color" or no color. If it's no color, it won't be visible. If by default color you mean black, then your code would be

div {
color: red;
border-bottom:solid #000000 medium;
}


----------



## namenotfound (Apr 30, 2005)

Duckman69 said:


> yea thats what i was asking 404, thank you... can you by chance help me with my div line code the idea was to limit the ammount of text in each page that i can spare by moving things to .css now that im learning it... i currently use the following code...
> 
> i cant seem to drawn the line with defualt or no color though... i guess this is kind of stupid i should just use that code and implement it every time i need to for div if you happen to know how i can draw a plain line with it please let me know i had a look on some sites but all the 1's i saw included a color so far... if you dont happen to know it im just gonna use the code in each div line like i should have in the first place i guess... thanks for your response though...


Remove the double quotes around "lawngreen" and it *should* work.

I never even heard of a shade of green called "lawngreen" before


----------



## Duckman69 (Jun 26, 2007)

thanks, appreciate it...


----------

