Help Positioning a background image

W

westsidesally

Here's the code I'm using:

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

I just have this placed inside the head, but I'm just not sure how to
get the image itself to move over about 200px from the left???
 
D

dorayme

Here's the code I'm using:

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

I just have this placed inside the head, but I'm just not sure how to
get the image itself to move over about 200px from the left???

background-position: 200px 0px;
 
W

westsidesally

dorayme said:
background-position: 200px 0px;

That's great, thanks a lot. So, is the first number always meant to
define from the left and the second from the top?

Also, is it better to simply link a css document rather than just
putting it all in the head?
 
W

westsidesally

dorayme said:
background-position: 200px 0px;



Oh yeah, and does the format look different when you're creating a css
page to link as opposed to formating it in the head of the page?
 
D

dorayme

That's great, thanks a lot. So, is the first number always meant to
define from the left and the second from the top?

If this works to do what you want, it will always work this way.
It does not depend on the day of the week: on odd days, the first
Also, is it better to simply link a css document rather than just
putting it all in the head?

Yes, if you have more than one or two css instructions, it is a
neater way to go, the css gets cached...
 
D

dorayme

Oh yeah, and does the format look different when you're creating a css
page to link as opposed to formating it in the head of the page?

It does not have the <style...></style> bits, otherwise the same.
The big point of hiving all off to a linked sheet is that this
sheet then controls all the the html pages, change in one
instructions affects all the html pages, you lose this power if
you include the styles either inline or in the head.

on the other hand, you gain if there are very few exceptions to
the general styles in one or two pages - a small entry in the
head of some styles just for those pages saves the head from
having to be all church like and invent classes and ids to cover
these cases in so few instances.
 
W

westsidesally

dorayme said:
It does not have the <style...></style> bits, otherwise the same.
The big point of hiving all off to a linked sheet is that this
sheet then controls all the the html pages, change in one
instructions affects all the html pages, you lose this power if
you include the styles either inline or in the head.

on the other hand, you gain if there are very few exceptions to
the general styles in one or two pages - a small entry in the
head of some styles just for those pages saves the head from
having to be all church like and invent classes and ids to cover
these cases in so few instances.

Thank you! That's very good to know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top