background image position

D

David Graham

http://www.alistapart.com/articles/fauxcolumns/

At the site above it says this:

"The 50% 0 bit refers to the positioning of the background image - in this
case, 50% from the left side of the browser window (resulting in a centered
image)"

I thought this would move the image over 50% from the left edge, resulting
in no image being present down the left half of the screen. Please could
someone explain what this excellent web site means by 50%

bye
David
 
D

David Dorward

David said:
"The 50% 0 bit refers to the positioning of the background image
I thought this would move the image over 50% from the left edge, resulting
in no image being present down the left half of the screen.

No. It puts the point $x% along the image $x% along the horizontal length of
the container. So 100% would put the right hand edge of the image along the
right hand edge of the container. 10% would put the put 10% along the image
10% along the container. And so on.
 
D

David Graham

David Dorward said:
No. It puts the point $x% along the image $x% along the horizontal length of
the container. So 100% would put the right hand edge of the image along the
right hand edge of the container. 10% would put the put 10% along the image
10% along the container. And so on.
Thanks for that
So, 0% would put the left edge of the image on the left side of the
container. No need to confirm I'm sure that is correct from what you say.
bye
David
 
D

David Graham

David Dorward said:
No. It puts the point $x% along the image $x% along the horizontal length of
the container. So 100% would put the right hand edge of the image along the
right hand edge of the container. 10% would put the put 10% along the image
10% along the container. And so on.
One more thing comes to mind, if the background image is wider than the
container - lets say the screen resolution is 800px maximised and the image
is 1200px wide, would a 50% 0 image have its extreme left and right sides
cropped in a symmetrical fashion, or would the image shrink itself to
display all the image inside the container.
bye
David
 
K

kchayka

David said:
if the background image is wider than the container
would the image shrink itself to
display all the image inside the container.

Why don't you just try it and see for yourself?
 
D

dorayme

David Graham said:
Your quite correct of course, but the specs don't make things as clear and
easy to understand as the experts in this group do. There's nothing like a
reply that gets straight to the hub of the problem.
bye
David

A good answer, David. I have a whole book on CSS that is no
better than http://www.w3.org/TR/CSS2... Many folk (including old
kchayka!) are much better at explaining things when they are in a
mood to do so...
 
K

kchayka

David said:
There's nothing like a
reply that gets straight to the hub of the problem.

Um, I did on-call support for more than 15 years. There was nothing that
irked me more than when somebody paged me for something that was easily
found in the manual. They usually said it was easier just to bother the
expert rather than look it up. I'm sure I am not the only person who
gets pretty annoyed by something like this.

RTFM first. If need be, ask about the parts you don't understand. In the
case of background images in CSS, it probably would have taken you 10
minutes to make up a test case that would have answered your own questions.

Make an effort to help yourself, eh?
 
D

David Graham

kchayka said:
Um, I did on-call support for more than 15 years. There was nothing that
irked me more than when somebody paged me for something that was easily
found in the manual. They usually said it was easier just to bother the
expert rather than look it up. I'm sure I am not the only person who
gets pretty annoyed by something like this.

RTFM first. If need be, ask about the parts you don't understand. In the
case of background images in CSS, it probably would have taken you 10
minutes to make up a test case that would have answered your own questions.

Make an effort to help yourself, eh?
Ok - help here is so freely given usually that it can make one lazy. Yes, I
can make a test case and will do so, but I do enjoy posting questions
because so often I have benefited by the throw away replies that experts add
to even straight forward questions. Sometimes I get more out of the
off-shoots from a posting than the primary answer. However, I will try to be
more self-reliant in future. I consider myself properly ticked off.
bye
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top