Avatar billede tampa Nybegynder
11. marts 2002 - 09:20 Der er 3 kommentarer og
1 løsning

Global background color in stylesheet

I'd like to be able to create a style so I can make global changes to my pages.

at present, all my pages have something like:
<body bgcolor="#CCCCFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">

I'd like to be able to refer to some style/class in my body tag which define the background color.

Smiles.
Avatar billede callesen Praktikant
11. marts 2002 - 09:32 #1
In HEAD:
<STYLE TYPE="text/css">
    body {
    background-color:#CCCCFF;
    }
</STYLE>
Avatar billede cdc Novice
11. marts 2002 - 09:38 #2
make a css and link to it from your html doc.
<LINK href="css_filer/your_css.css" type=text/css rel=styleSheet>

body {background-color:#CCCCFF;}

You can define margin in IE but not in NE, the margin for NE you have to define in the body tag.

/cdc
Avatar billede tampa Nybegynder
11. marts 2002 - 11:13 #3
cdc's answer was better because of the global functionality - but you still deserve something callesen.

thanks for the answers!
Avatar billede tampa Nybegynder
11. marts 2002 - 11:14 #4
tried giving you points callesen, but got an error... something about not giving enough points????

sorry guy.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester