I use this CSS code on my website:
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en">
<head>
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<style type="text/css">
body{
padding:10px;
margin:0;
color:#fff;
background-color:aliceblue;
font: 13px comic sans ms;
}
#header{
padding:0;
margin:0;
text-align:center;
border:1px dotted blue;
font: 13px comic sans ms;
color:black;
}
#contain{
float:left;/* Allows content to float on the right hand side of the div. */
width:100%;/* Prevents the div from collapsing to 0 width as div tags usually do when they are floated. */
margin:10px -160px 10px 0;/* Provides top and bottom margin, also narrows the div tag by 160px so the right side-bar has somewhere to go. */
}
#main{
float:right;/* Allows content to float on the left hand side of the div. */
width:100%;/* Prevents the div from collapsing to 0 width as div tags usually do when they are floated. */
margin:0 0 0 -160px;/* Narrows the div tag by 160px so the left side-bar has somewhere to go. */
color: blue;
background-color: #f0f8ff;
font: 13px comic sans ms ;
}
#centre{
border:1px solid blue;
text-align:center;
margin:0 160px;/* Provides a 160px gap for the side-bar to go into. */
background-color:#97c9ff;
}
#left{
width:150px;
border:1px dashed blue;
text-align:left;
float:left;/* Allows content to float on the right hand side of the div. */
color: blue;
background-color:#ccffff;
font: 13px comic sans ms ;
}
#right{
margin:10px 0;/* Provides a top and bottom margin. */
width:150px;
border:1px dashed blue;
text-align:center;
float:right;/* Allows content to float on the left hand side of the div. */
color: blue;
background-color:#ccffff;
font: 13px comic sans ms ;
}
#footer{
clear:both;/* To keep the footer from floating next to whichever column is longer. */
border:1px double #fff;
text-align:center;
color: blue;
background-color: #ccccff;
font: 13px comic sans ms ;
}
a:link {color:#09c; text-decoration:none;}
a:visited {color:#07a;}
a:hover {background-color:#eee;}
How do I get the background of the page to be coloured? I can only get it coloured around each div, and so have to use the body bgcolor tag. For example, if I don't use the BG tag, it looks like this (<!-- m --><a class="postlink" href="http://www.bigwowwebhosting.com/affiliates.php">http://www.bigwowwebhosting.com/affiliates.php</a><!-- m -->)Is aliceblue a colour name? Try and use a hex colour value.From the CSS2 Specification:A <color> is either a keyword or a numerical RGB specification.
The list of keyword color names is: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. These 16 colors are defined in HTML 4.0 ([HTML40]). In addition to these color keywords, users may specify keywords that correspond to the colors used by certain objects in the user's environment.Where does it say aliceblue? I used to have that but changed it to the Hex colour code a few months ago. Must of missed one.
Its not that though, as pages which have the hex value still don't work.* html body { background: #123456 !important; }
Lol. I don't know if that'll work, but you could try.I looked at the stylesheet on the site, way wrong.
Remove all this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en">
<head>
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<style type="text/css">
And change your colour from aliceblue in the body background property to a hex value.Thanks, it works now I've taken out that stuff from the top
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en">
<head>
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<style type="text/css">
body{
padding:10px;
margin:0;
color:#fff;
background-color:aliceblue;
font: 13px comic sans ms;
}
#header{
padding:0;
margin:0;
text-align:center;
border:1px dotted blue;
font: 13px comic sans ms;
color:black;
}
#contain{
float:left;/* Allows content to float on the right hand side of the div. */
width:100%;/* Prevents the div from collapsing to 0 width as div tags usually do when they are floated. */
margin:10px -160px 10px 0;/* Provides top and bottom margin, also narrows the div tag by 160px so the right side-bar has somewhere to go. */
}
#main{
float:right;/* Allows content to float on the left hand side of the div. */
width:100%;/* Prevents the div from collapsing to 0 width as div tags usually do when they are floated. */
margin:0 0 0 -160px;/* Narrows the div tag by 160px so the left side-bar has somewhere to go. */
color: blue;
background-color: #f0f8ff;
font: 13px comic sans ms ;
}
#centre{
border:1px solid blue;
text-align:center;
margin:0 160px;/* Provides a 160px gap for the side-bar to go into. */
background-color:#97c9ff;
}
#left{
width:150px;
border:1px dashed blue;
text-align:left;
float:left;/* Allows content to float on the right hand side of the div. */
color: blue;
background-color:#ccffff;
font: 13px comic sans ms ;
}
#right{
margin:10px 0;/* Provides a top and bottom margin. */
width:150px;
border:1px dashed blue;
text-align:center;
float:right;/* Allows content to float on the left hand side of the div. */
color: blue;
background-color:#ccffff;
font: 13px comic sans ms ;
}
#footer{
clear:both;/* To keep the footer from floating next to whichever column is longer. */
border:1px double #fff;
text-align:center;
color: blue;
background-color: #ccccff;
font: 13px comic sans ms ;
}
a:link {color:#09c; text-decoration:none;}
a:visited {color:#07a;}
a:hover {background-color:#eee;}
How do I get the background of the page to be coloured? I can only get it coloured around each div, and so have to use the body bgcolor tag. For example, if I don't use the BG tag, it looks like this (<!-- m --><a class="postlink" href="http://www.bigwowwebhosting.com/affiliates.php">http://www.bigwowwebhosting.com/affiliates.php</a><!-- m -->)Is aliceblue a colour name? Try and use a hex colour value.From the CSS2 Specification:A <color> is either a keyword or a numerical RGB specification.
The list of keyword color names is: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. These 16 colors are defined in HTML 4.0 ([HTML40]). In addition to these color keywords, users may specify keywords that correspond to the colors used by certain objects in the user's environment.Where does it say aliceblue? I used to have that but changed it to the Hex colour code a few months ago. Must of missed one.
Its not that though, as pages which have the hex value still don't work.* html body { background: #123456 !important; }
Lol. I don't know if that'll work, but you could try.I looked at the stylesheet on the site, way wrong.
Remove all this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en">
<head>
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<style type="text/css">
And change your colour from aliceblue in the body background property to a hex value.Thanks, it works now I've taken out that stuff from the top