Re: [WSG] Background-position in percentage

2008-06-04 Thread rhodry
This is because x and y axis are not used in HTML only in JavaScript as far
as I am aware.


On 5:01:19 am 06/04/08 John Horner [EMAIL PROTECTED] wrote:
 I've just spent a bit of time looking at how background-position works
 when expressed as a percentage:

   background-position: 90%;

 and I'm wondering why it works the way it does.

 Here's the best way I can describe the effect of (90%, x-axis)
 positioning with percentages: to position the image such that the
 point 90% across the image is aligned with the point 90% across the
 element.
 There's something rather counter-intuitive about that (it's even hard
 to describe!), and I've tried to explain it in teaching people about
 CSS and found that people are rather baffled by it.

 Does anyone know why it was created that way, and/or can you tell me
 if there's some very useful thing this rule allows you to do? That
 is, as opposed to a simpler rule like image is offset that amount to
 the left which is what I assumed when I first came across it.


 Please consider the environment before printing this e-mail.

 The information contained in this email and any attachment is
 confidential and may contain legally privileged or copyright
 material.   It is intended only for the use of the addressee(s).  If
 you are not the intended recipient of this email, you are not
 permitted to disseminate, distribute or copy this email or any
 attachments.  If you have received this message in error, please notify
 the sender immediately and delete this email from your system.  The
 ABC does not represent or warrant that this transmission is secure or
 virus free.   Before opening any attachment you should check for
 viruses.  The ABC's liability is limited to resupplying any email and
 attachments.

 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Background-position in percentage

2008-06-04 Thread Chris Price




[EMAIL PROTECTED] wrote:
Here's
the best way I can describe the effect of (90%, x-axis)
  
positioning with percentages: "to position the image such that the
point 90% across the image is aligned with the point 90% across the
element".
  

That makes sense because if you set the x-axis to 100% its aligned
right, 0% and its aligned left, 50% and its aligned centre.

If the percentage width of the element related to the zero point of the
background image then 100% would place it wholly to the right of the
element. At 50% the image's left side would start at midway in the
element but then the percentage would be meaningless in terms of the
element itself.

It would be of little practical use.

This never occurred to me before you mentioned it.
-- 
Kind
Regards
Chris
Price


[EMAIL PROTECTED]

www.choctaw.co.uk
Tel.
01524 825 245

Mob. 0777 451 4488
Beauty
is in the Eye of the Beholder while

Excellence is in the Hand of the Professional
~~

Sent on behalf of Choctaw Media Ltd 
~~
Choctaw
Media Limited is a company registered in

England and Wales with company number 04627649

Registered
Office: Lonsdale Partners, Priory Close,

St Mary's Gate, Lancaster LA1 1XB  United Kingdom




***List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmUnsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmHelp: [EMAIL PROTECTED]***

Re: [WSG] Background-position in percentage

2008-06-04 Thread Matthew Pennell
On Wed, Jun 4, 2008 at 1:25 PM, Chris Price [EMAIL PROTECTED] wrote:
 This never occurred to me before you mentioned it.

More details on background positioning here:

http://www.digital-web.com/articles/web_design_101_backgrounds/

-- 

- Matthew


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



[WSG] Background-position in percentage

2008-06-03 Thread John Horner
I've just spent a bit of time looking at how background-position works
when expressed as a percentage:

  background-position: 90%;

and I'm wondering why it works the way it does.

Here's the best way I can describe the effect of (90%, x-axis)
positioning with percentages: to position the image such that the point
90% across the image is aligned with the point 90% across the element.

There's something rather counter-intuitive about that (it's even hard to
describe!), and I've tried to explain it in teaching people about CSS
and found that people are rather baffled by it.

Does anyone know why it was created that way, and/or can you tell me if
there's some very useful thing this rule allows you to do? That is, as
opposed to a simpler rule like image is offset that amount to the left
which is what I assumed when I first came across it.


Please consider the environment before printing this e-mail.

The information contained in this email and any attachment is confidential and
may contain legally privileged or copyright material.   It is intended only for
the use of the addressee(s).  If you are not the intended recipient of this
email, you are not permitted to disseminate, distribute or copy this email or
any attachments.  If you have received this message in error, please notify the
sender immediately and delete this email from your system.  The ABC does not
represent or warrant that this transmission is secure or virus free.   Before
opening any attachment you should check for viruses.  The ABC's liability is
limited to resupplying any email and attachments.


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Background-position in percentage

2008-06-03 Thread Алексей Тен
On Wed, Jun 4, 2008 at 8:01 AM, John Horner [EMAIL PROTECTED] wrote:
 I've just spent a bit of time looking at how background-position works
 when expressed as a percentage:

  background-position: 90%;

 and I'm wondering why it works the way it does.

 Here's the best way I can describe the effect of (90%, x-axis)
 positioning with percentages: to position the image such that the point
 90% across the image is aligned with the point 90% across the element.
Have you read specs?
http://www.w3.org/TR/CSS21/colors.html#propdef-background-position

 There's something rather counter-intuitive about that (it's even hard to
 describe!), and I've tried to explain it in teaching people about CSS
 and found that people are rather baffled by it.

 Does anyone know why it was created that way, and/or can you tell me if
 there's some very useful thing this rule allows you to do? That is, as
 opposed to a simpler rule like image is offset that amount to the left
 which is what I assumed when I first came across it.
Can you provide other way to align right edge of background image
with right edge of box? To center background image?

-- 
Алексей

***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

RE: [WSG] Background-position in percentage

2008-06-03 Thread Jens-Uwe Korff
 Does anyone know why [bg image positioning] was created that way,
and/or can you tell me if there's some very useful thing this rule
allows you to do?

As Alex pointed out this is the way to use if you want to right-align or
bottom-align a bg image. Also for horizontal/vertical centering this is
an easy way to go.

I agree with you that the way it works might seem strange at first but
if it wasn't it wouldn't work as outlined above.

Cheers,
 
Jens 

The information contained in this e-mail message and any accompanying files is 
or may be confidential. If you are not the intended recipient, any use, 
dissemination, reliance, forwarding, printing or copying of this e-mail or any 
attached files is unauthorised. This e-mail is subject to copyright. No part of 
it should be reproduced, adapted or communicated without the written consent of 
the copyright owner. If you have received this e-mail in error please advise 
the sender immediately by return e-mail or telephone and delete all copies. 
Fairfax does not guarantee the accuracy or completeness of any information 
contained in this e-mail or attached files. Internet communications are not 
secure, therefore Fairfax does not accept legal responsibility for the contents 
of this message or attached files.


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



[WSG] Background position

2005-12-14 Thread Bruce
CSS rules state clearly  background-position vertical and horizontal
settings.
I can get a backgound anyplace from center to far right, but cannot get it
any distance from the top???
Is there any reason a backgound would not position with any values to be
down a certain distance from the top?
body {color: #000 ;  background: #FFF;
background:#FFF url(/business/images/mainbk.jpg);
background-position: 100px 150px;
font-family: Verdana, Helvetica, sans-serif;
font-size: 90%;
margin: 0;
padding: 0;
}
Percentages nothin moves it down. Tried in another container and same, glued
to top???
http://www.quirksmode.org/css/backgroundposition.html

looks good but no work for me? weird...
Thanks
Bruce Prochnau
BKDesign Solutions

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**