Monday 17 October 2011

How do I add a background to this web page with this code.?

Ok. Any help would be great. I have a myspace profile page and would like to change the background in my layout from gray to a image I have saved on photobucket.com and my computer (obviously). This is the code at the begining. NOTE: I didnt use any editor online. I used codes from a layout I found so it's different than any myspace page out there.



%26lt;style type=%26quot;text/css%26quot;%26gt;

body {

font-family: helvetica, arial, sans-serif;

font-size: 62.5%;

background-color: 444444;

}



table, td {

background-color: 444444;

}



.main{

position:absolute;

left:50%;

top:125px;

width:800px;

z-index:1;

margin-left:-400px;

}



.main a:link, .main a:active, .main a:visited {

color: a3bdc8;

text-decoration: none;

font-size: 1em;

}



.main a:hover {

color: ffffff;

}



img {

border: 0;

filter:alpha(opacity=80);

-moz-opacity: 0.80;

opacity: 0.80;

}



img:hover{

filter:alpha(opacity=95);

-moz-opacity: 0.95;

opacity: 0.95;

}



p, li {

font-size: 1.2em;

color: f0f0f0;

}



.title1, .title2 {

font-weight: bold;

text-transform: lowercase;

letter-spacing: -1px;

color: dbdbdb;

}



.title1 {

font-size: 1.3em;

}



.title2 {

font-size: 1.2em;

}



.title2 a {

font-size: 1.1em;

}



.sidebar .title2 {

padding: 0 0 0 12px;

}



.newnav {

margin: 11px 0 20px 0;

padding: 0;

text-transform: lowercase;

letter-spacing: -1px;

}



.newnav a {

font-size: 1.2em;

color: d0d0d0 !important;

}



.newnav a:hover {

color: ffffff !important;

}



.newnav .active {

color: ffffff !important;

}



.newnav li {

list-style: none;

display: inline;

margin: 0 0 0 13px;

}



.sidebar {

float: right;

width: 200px;

}



.content {

float: left;

width: 500px;

padding: 0 0 0 28px;

}



.breaker {

clear: both;

margin-top: 25px;

border-top: 1px solid;

border-color: 777777;

background-image: url(%26quot;http://img440.imageshack.us/img440/鈥?br>
background-repeat: repeat-x;

height: 200px;

}



.cell {

float: left;

padding-top: 10px;

margin: 0 0 0 25px;

}



.cell-inner {

width: 225px;

padding: 0 10px 0 0;

}



.bottoms {

clear: both;

padding: 45px 0 0 0;

}



textarea {

background-color: 555555;

border: 1px solid;

border-color: 666666;

color: f0f0f0;

padding: 3px;

overflow: hidden;

}



input {

background-color: 444444;

color: f0f0f0;

border: 1px solid;

border-color: 666666;

}



.askfirst {

clear: both;

text-align: center;

padding: 25px 0 0 0;

}

%26lt;/style%26gt;

%26lt;div class=%26quot;main%26quot;%26gt;

%26lt;table style=%26quot;width:800px; height:800px; cellpadding:0px; cellspacing:0px;background-color:444444;鈥?br>
%26lt;tr%26gt;%26lt;td valign=%26quot;top%26quot;%26gt;

______________________________________鈥?br>


Thats wat I have as the background right now. I'd like to change that to this image html code:



%26lt;a href=%26quot;http://s262.photobucket.com/albums鈥?target=%26quot;_blank%26quot;%26gt;%26lt;img src=%26quot;http://i262.photobucket.com/albums/鈥?border=%26quot;0%26quot; alt=%26quot;Photobucket%26quot;%26gt;%26lt;/a%26gt;



______________________________________鈥?br>


Please help I do not know how to put this code in and would love to learn.How do I add a background to this web page with this code.?Change this:

body {

font-family: helvetica, arial, sans-serif;

font-size: 62.5%;

background-color: 444444;

}



to this:

body {

font-family: helvetica, arial, sans-serif;

font-size: 62.5%;

background-color: 444444;

background-image: url('url where the image is located');

}





see http://www.w3schools.com/css/css_referen鈥?/a>

for more options on background images and css.



^ To the person above, you forgot to put ' around the url.
How do I add a background to this web page with this code.?
Since you are changing the background of your page, you only need to edit the body off the CSS. Change your first 6 lines to the following:





%26lt;style type=%26quot;text/css%26quot;%26gt;

body {

font-family: helvetica, arial, sans-serif;

font-size: 62.5%;

background-image: url(http://i262.photobucket.com);

}





Of course, you need to update the image url located within the ( ) in order for your background to appear correctly. And that should solve your problem.