Gå til innhold

CSS, hvorfor blir den hvite bakgrunnen svart i FireFox, men ikke IE (gamle versj).


Anbefalte innlegg

Er en enkel side i html og css.

 

Ser dere noen feil?

/*
Template name: Natural Essence
Template URI: http://templates.arcsin.se/natural-essence-website-template/
Release date: 2007-02-20
Description: Soft and natural single/two-column template.
Author: Viktor Persson
Author URI: http://arcsin.se/

This template is licensed under a Creative Commons Attribution 2.5 License:
http://templates.arcsin.se/license/
*/


/* default elements */
* {margin: 0; padding: 0;}

body {
background: #000000 url(img/bg.jpg);
color: #000;
font: normal 62.5% sans-serif;
padding: 2% 0;
}

a {color: #000;}
a:hover {color: #000;}

big {font-size: 1.1em;}

h1,h2,h3 {color: #000; padding: 8px 0 2px;}

h1 {font: normal 2.4em serif,sans-serif;}
h1 a {text-decoration: none;}
h1 a:hover {text-decoration: underline;}

h2 {font: normal 1.6em serif,sans-serif;}
h3 {font: bold 1.2em serif,sans-serif;}

blockquote {
background: url('img/quote.gif') no-repeat;
display: block;
font: normal 1.1em Georgia,serif;
padding-left: 26px
}

form,table {margin-bottom: 1.2em;}
img {border: none;}
label {display: block;}
li {line-height: 1.5em;}
p {padding: 2px 0 10px;}
small,.small {font: normal 0.9em sans-serif;}
ul {padding: 0 2em 1.2em;}

/* structure */
#wrapper {
background: #FFFFFF url(img/wrapper.gif) no-repeat left bottom;
margin: 0 auto;
width: 750px;
}
#container {
background: #FFFFFF;
border-top: 6px solid #000;
font-size: 1.3em;
line-height: 1.3em;
margin: 0 auto;
width: 750px;
}

/* header */
.title {
background: #000000;
border-top: 0px solid #000;
}
.title h1 {
color: #FFFFFF;
font: normal 2.2em Georgia,"Trebuchet MS",sans-serif;
padding: 10px 0 10px 18px;
}

.header {
border-top: 0px solid #663;
background: #000000 url(img/headergif.gif) no-repeat left bottom;
height: 393px;
}

/* navigation */
.navigation {
background: #FFFFFF url(img/nav.gif) repeat-x; height: 41px;
border-top: 1px solid #996;
}
.navigation a {
background: #FFF url(img/nav.gif) repeat-x;
border-right: 1px solid #070707;
color: #553;
float: left;
font: bold 1em Tahoma,sans-serif;
padding: 0 14px;
line-height: 41px;
text-align: center;
text-decoration: none;
}
.navigation a:hover,.navigation a#active {background-position: left bottom; color: #331;}

/* main */
.main#two-columns {background: #FFF url(img/two-columns.gif) repeat-y;}

/* bottom */
.bottom {
background: #000000 url(img/bottom.gif) no-repeat left bottom;
border-top: 1px solid #AA8;
color: #000;
padding: 14px 20px;
}
.bottom .left,.bottom .right {width: 49%;}

/* footer */
.footer {
background: #000;
color: #EED;
padding: 10px;
}
.footer .left {width: 66%;}
.footer .right {
width: 33%;
text-align: right;
}
.footer a {
color: #FFF;
text-decoration: none;
}
.footer a:hover, .footer .right a:hover {
color: #FFF;
text-decoration: underline;
}
.footer .right, .footer .right a {color: #7D7D75;}

/* gallery */
.gallery td {
vertical-align: top;
text-align: center;
}
.gallery em {display: block;}

/* misc */
.clear,.clearer {clear: both;} 
.clearer {font-size: 0;}
.col2 .left {width: 100%;}
.col2 .right .content {background: #FFF;}
.col2 .right {width: 0%;}
.content {padding: 18px 20px;}
.left {float: left;}
.right {float: right;}
.right .content {padding: 18px 12px 12px;}

/* block list */
ul.block {
border-top: 1px dashed #FFFFFF;
margin: 4px 0;
padding: 0;
width: 90%;
}
.block li {
border-bottom: 1px dashed #FFFFFF;
list-style: none;
}
.block li a,.block li em {
color: #553;
display: block;
}
.block li em {
font-size: 0.9em;
font-style: normal;
}
.block li a {
padding: 4px 3%;
text-decoration: none;
width: 94%;
}
.block li a span {font-weight: bold;}
.block li a:hover {
background: #FFFFFF;
color: #553;
}

.right .block,.right .block li {border-color: #FFFFFF;}
.right .block li a:hover {background: #FFFFFF;}

 

Fra html-fil:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Endret av jogil
Lenke til kommentar
Videoannonse
Annonse

Skjønner ikke helt om du vil ha bakgrunnen hvit eller svart.

 

background: #000000 url(img/bg.jpg)

Her settes bakgrunnen svart, samtidig som du setter inn et bakgrunnsbilde.

 

background: #FFFFFF url(img/wrapper.gif) no-repeat left bottom;

Her settes bakgrunnen i #wrapper hvit.

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...