PDA

View Full Version : HTML question


Lara Coft Baby
11-12-06, 22:19
I am redoing my Orlando Bloom site to make it look prettier. Cause the way it its just looks kind of sloppy in my opinion. I am pretty good at HTML but I am still learning a bit. I want to align the background image to the left. And I know the code for it but since I haven't used it in a long time. I cant remember what the code is. Dose any one know?? I cant seem to figure it out. :p

Michiel
11-12-06, 23:04
I would say use CSS code for it. You could put it a seperate css or use inline style information under body. All allowed background properties can be found here:

http://www.w3.org/TR/CSS1#color-and-background-properties

In this case it would be:

background-position: left;

If you only want the image once, also use this:

background-repeat: no-repeat;

stereopathic
11-12-06, 23:14
you'll prolly have to use style statements to get those to work. i.e:

<style type="text/css">
background-position: left;
background-repeat: no-repeat;
</style>

Michiel
11-12-06, 23:25
you'll prolly have to use style statements to get those to work. i.e:

You have to set it to the body tag then of course :p

<style type="text/css">
body {
background-position: left;
background-repeat: no-repeat;
background-image: url(picture.gif)
}
</style>

Or use inline style information:
<body style="background-position: left; background-repeat: no-repeat; background-image: url(picture.gif)">

But best is to either set it as style in the head of the page or in a seperate css. Using inline style information might for this will make the page a big mess. If you use css good you can make the html code very clean.

Lara Coft Baby
11-12-06, 23:38
I dont think what i am using is CSS

The red part is the back ground url and the position

<STYLE type=text/css>BODY {
SCROLLBAR-FACE-COLOR: #880000; FONT-SIZE: medium; BACKGROUND-ATTACHMENT: fixed; SCROLLBAR-HIGHLIGHT-COLOR: #000000; CURSOR: Crosshair; SCROLLBAR-SHADOW-COLOR: #000000; COLOR: #3366FF; SCROLLBAR-3DLIGHT-COLOR: #000000; SCROLLBAR-ARROW-COLOR: #000000; SCROLLBAR-TRACK-COLOR: #000000; background-image: url(http://www.fileden.com/files/2006/12/11/498922/OBW%20BG2.jpg); BACKGROUND-REPEAT: align left; FONT-FAMILY: Times New Roman; SCROLLBAR-DARKSHADOW-COLOR: #000000; BACKGROUND-COLOR: #000011; TEXT-ALIGN: center
</STYLE>

I figured out how to align it to the left with this

background-image: url(http://www.fileden.com/files/2006/12/11/498922/OBW%20BG2.jpg); BACKGROUND-REPEAT:no-repeat; BACKGROUND-align:left;

I want the code to align it to the right, But i when i change the left to right it would move the picture to the right :confused:

Michiel
11-12-06, 23:44
This code needs some cleaning up :p

<STYLE type=text/css>
BODY {
SCROLLBAR-FACE-COLOR: #880000; Invalid entry, code does not exist
FONT-SIZE: medium;
BACKGROUND-ATTACHMENT: fixed;
SCROLLBAR-HIGHLIGHT-COLOR: #000000; Invalid entry, code does not exist
CURSOR: Crosshair;
SCROLLBAR-SHADOW-COLOR: #000000; Invalid entry, code does not exist
COLOR: #3366FF;
SCROLLBAR-3DLIGHT-COLOR: #000000; Invalid entry, code does not exist
SCROLLBAR-ARROW-COLOR: #000000; Invalid entry, code does not exist
SCROLLBAR-TRACK-COLOR: #000000; Invalid entry, code does not exist
background-image: url(http://www.fileden.com/files/2006/12...BW&#37;20BG2.jpg);
BACKGROUND-REPEAT: align left; Bad value, allowed values are repeat | repeat-x | repeat-y | no-repeat
FONT-FAMILY: Times New Roman;
SCROLLBAR-DARKSHADOW-COLOR: #000000; Invalid entry, code does not exist
BACKGROUND-COLOR: #000011;
TEXT-ALIGN: center
}
</STYLE>



background-image: url(http://www.fileden.com/files/2006/12/11/498922/OBW%20BG2.jpg); BACKGROUND-REPEAT:no-repeat; BACKGROUND-align:left;

I want the code to align it to the right, But i when i change the left to right it would move the picture to the right :confused:

BACKGROUND-align is invalid, the correct code is background-position. Allowed valued are [top | center | bottom] || [left | center | right]. Default is top left.

stereopathic
11-12-06, 23:45
you are trying to align with your bg repeat statement. you need to use a background-position statement.

Lara Coft Baby
11-12-06, 23:49
This code needs some cleaning up :p

<STYLE type=text/css>
BODY {
SCROLLBAR-FACE-COLOR: #880000; Invalid entry, code does not exist
FONT-SIZE: medium;
BACKGROUND-ATTACHMENT: fixed;
SCROLLBAR-HIGHLIGHT-COLOR: #000000; Invalid entry, code does not exist
CURSOR: Crosshair;
SCROLLBAR-SHADOW-COLOR: #000000; Invalid entry, code does not exist
COLOR: #3366FF;
SCROLLBAR-3DLIGHT-COLOR: #000000; Invalid entry, code does not exist
SCROLLBAR-ARROW-COLOR: #000000; Invalid entry, code does not exist
SCROLLBAR-TRACK-COLOR: #000000; Invalid entry, code does not exist
background-image: url(http://www.fileden.com/files/2006/12...BW%20BG2.jpg);
BACKGROUND-REPEAT: align left; Bad value, allowed values are repeat | repeat-x | repeat-y | no-repeat
FONT-FAMILY: Times New Roman;
SCROLLBAR-DARKSHADOW-COLOR: #000000; Invalid entry, code does not exist
BACKGROUND-COLOR: #000011;
TEXT-ALIGN: center
}
</STYLE>

Blame that on my friend who did that :p :p



you are trying to align with your bg repeat statement. you need to use a background-position statement.
Umm i tried that it didnt seem to work

stereopathic
11-12-06, 23:52
try:

background-position:top left;

instead of:

BACKGROUND-REPEAT: align left;

Lara Coft Baby
11-12-06, 23:54
nope it just repeats it (makes it tiled)

Michiel
11-12-06, 23:56
Also put background-repeat: no-repeat; in of course.

stereopathic
11-12-06, 23:57
change your bg repeat to:

background-repeat: no-repeat;

that should fix that.

-edit- like he said ^^^ :D

Lara Coft Baby
11-12-06, 23:59
Right now this is the code i am using

BACKGROUND-REPEAT:no-repeat;

And its aligned to the left. But i want a code for if i wanted to align the picture to the right i could. But the codes you guys gave me dont seem to be working

:confused: :confused: :confused:

Lara Coft Baby
12-12-06, 00:02
HA figured it out

The red part is the code i am using now, change the left to right and it works.

this codes alow me to to center it, align it to the left or right.

<STYLE type=text/css>BODY {
background-position: top left;
FONT-SIZE: medium; BACKGROUND-ATTACHMENT: fixed; CURSOR: Crosshair; COLOR: #3366FF; background-image: url(http://www.fileden.com/files/2006/12/11/498922/OBW%20BG2.jpg); BACKGROUND-REPEAT:no-repeat; FONT-FAMILY: Times New Roman; BACKGROUND-COLOR: #000011; TEXT-ALIGN: center
</STYLE>

Michiel
12-12-06, 00:05
It works perfect for me. I put on a little test page and the background image shows on the right, as it should:

http://www.trsearch.org/test.html