How do i change the background of my page?
originally contributed by: Logan Sakai
changing your background can be either easy or a little tricky,
depending on how you want your background to act. the way i do it is by
using cascading style sheets (CSS) because it allows greater
flexibility over the standard <body> tag. to change the color,
you will need to consult a color chart
(SEE ADDITIONAL RESOURCES SECTION). simply type the six-digit color code where it says 'color_code'.
first start out with this code. you will need to use this, or else your background wont show up. this gets rid of all current table styling:
<style type="text/css"> table, tr, td { background-color:transparent; border:none; border-width:0;} </style> |
the above piece of code is important because
it will make the table backgrounds transparent so that you can see your
background image.to just change the color of your background:
<style type="text/css"> body { background-color: color_code;} </style>
|
to use a FIXED picture as your background:(also known as "i want my background to stay in place while my words move")
<style type="text/css"> body { background-image:url("BACKGROUND URL HERE"); background-attachment:fixed;} </style>
|
here are other variables you can use that will change the way your background is displayed. just add them between the existing <style> tags:
specify how you want it to repeat: background-repeat: repeat-y;
repeat-x | repeat-y | no-repeat
position by plain words:
background-position: left bottom;
x axis - left | center | right y-axis - top | center | bottom
position by percentages: background-position: x% y%;
position by exact pixel coordinates:
background-position: x y;
for background-positions.. left variable should always be x-axis, and right variable should always be your y-axis.
|
heres an example of an entire background style. this will result in a centered picture that repeats vertically, with a white background:
<style type="text/css"> table, td, tr { background-color:transparent; border:none; border-width:0;} body { background-color: FFFFFF; background-image: url('http://www.picture.com/pic.jpg'); background-repeat: repeat-y; background-position: center;} </style>
|
6:15 AM
(User has disabled new comments)
Powered by  |
| English |
| Albanian |
| Arabic |
| Bulgarian |
| Catalan |
| Chinese |
| Croatian |
| Czech |
| Danish |
| Dutch |
| Estonian |
| Filipino |
| Finnish |
| French |
| Galician |
| German |
| Greek |
| Hebrew |
| Hindi |
| Hungarian |
| Indonesian |
| Italian |
| Japanese |
| Korean |
| Latvian |
| Lithuanian |
| Maltese |
| Norwegian |
| Polish |
| Portuguese |
| Romanian |
| Russian |
| Serbian |
| Slovak |
| Slovenian |
| Spanish |
| Swedish |
| Thai |
| Turkish |
| Ukrainian |
| Vietnamese |