 |
BACKGROUNDS
You are finally ready to learn how to code yourself! First off, you might want to open this in a new tab/window. Whenever you wish to try out a code, just type it up where it says and preview. If it doesn't work, something is wrong with the code. If the link didn't work, the url goes to www.themes.gaiatools.com/try
In this section of the guide, I will attempt to teach you backgrounds. Keep in mind these are for v1 or Classic profiles only!
Backgrounds are pretty simple, especially colors. Here is an example of a background code.
section name {
background : color or HEXcode
;}
Just replace what is underlined with whatever you want. I decided to fill it in for you. Try this code out using your profile, the link I mentioned above, or a mule's profile.
#about {
background : blue
;}
Did you try it? If you didn't, it just made the about me section's background color blue. Nothing too fancy. You can make background colors on links, sections, and even the body [the background].
Now try and type up your own background code and try it out. There is a base for this code earlier in this section.
So, did you type up your own?
No you say?
Well go do it!
Welcome back, I see you typed up your own background color code. So, now that you understand the background colors, let's take a look at background images. Here is a background image code, everything underlined, you can replace with what you want.
section name {
background : url( an image's direct link ) image details
;}
First, let's talk about the second underlined part. See those little curved lines? Those are supposed to be there, don't delete them or it will ruin the code. Inside those, you just have to put the url of the image you want. Make sure it's the 'direct link' and not another type of link.
Next, I think you should learn about image details. Kk, image details are things like where the image will be on the background, and if it does that funky tile thing on your background. First, let's talking about the tile thing.
Have you ever put a picture on your desktop with the "tile" setting? Well that is what I'm referring to. If you do not know what I'm talking about, test out the following code and look at the background.
body {
background : url( http://i234.photobucket.com/albums/ee71/Rare-Floof-Penguin/PurpleandOrangeLightningBodyBackgro.png )
;}
Kk, now see how it goes everywhere on the background? Well, that is tiling, or repeat. Repeat is the default when you put a background image, so to stop it from repeating, take a look at this code.
body {
background:url(http://i234.photobucket.com/albums/ee71/Rare-Floof-Penguin/PurpleandOrangeLightningBodyBackgro.png) no-repeat
;}
Ok, now look at the underlined. That's what I added from the last code. If you put in 'no-repeat', it makes it so the image will not repeat. It is very important that you leave a space between the second ')' and the 'no-repeat'. If there is no space, the image will not be viewable in Internet Explorer.
If you are using a classic profile, changes are when you put in that code, all you saw was a white background. Well that's because the picture is covered by the header. You need to change where the picture goes to actually see it.
All you need is to add positioning to the image. It's actually pretty simple, you just add words for positioning, not those complicated coded items. Kay, so take a look at this code. I added to the last code, just look at the underlined.
body {
background:url(http://i234.photobucket.com/albums/ee71/Rare-Floof-Penguin/PurpleandOrangeLightningBodyBackgro.png) top right no-repeat
;}
Kk, now try that code out, see how it's now at the right center of the background? Well, you can add anything like that. Here is a list of what you can add instead.
top left
top center
top right
top left
left center
bottom left
center
right center
bottom left
bottom center
bottom right
I'm pretty sure the positioning has to go before the no-repeat thing. I'm not exactly sure why, but it didn't work till I put the positioning before the no-repeat.
There is a more exact way to position images, but it's a mess, at least it is to me. So forget about that.
I know this is a little late to mention, but you can make your background see through or transparent.
section name {
background : transparent
;}
I'm not sure what would happen if you put it on the background, because I don't know what's under it. I don't plan to find out any time soon. Try this out:
#content {
background : transparent
;}
See how it showed the background instead of the big white block? Well that's because you made the big white block see through.
NOTE: When you are putting image attachments such as 'no-repeat' or 'top right', make sure that it is between the ')' and the ';'. Because the ';'s divide different codes, if you were to put it on the right side of the ';', it would be out of the code with the image in it.
Kk, now there is only one thing left to cover, it is background attachments. At least, I think that's what they are called. Well anyway, they are pretty hard to explain, so take a look at the following codes.
Clear your theme override box and put in the following code.
body {
background:url(http://i234.photobucket.com/albums/ee71/Rare-Floof-Penguin/PurpleandOrangeLightningBodyBackgro.png) top right no-repeat;
background-attachment: fixed
;}
I underlined what I added from a couple codes up. In this code you DO NOT put it where the 'no-repeat' and such goes. It is a separate code from the background image. You don't need it in the same code, because it is specifically for the background image. With that code in your theme override box, scroll down your profile and look at the background. See how it stays there? That is the affect of 'background-attachment: fixed'. To get it back to normal, either delete the background attachment code to make it default, or replace 'fixed' with 'scroll'.
Wow, what a long section! I sure hope you didn't die of boredom. I'm pretty sure no other sections will be nearly this long. Remember, do not give up coding, it's hard at first, but it shall be worth it when you are selling profiles for one million gold a piece.
>:3
|
|