HighDots Forums  

Positioning a background image with CSS...

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Positioning a background image with CSS... in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike
 
Posts: n/a

Default Positioning a background image with CSS... - 03-24-2009 , 04:04 PM






What's the syntax to position an image to start tiling horizontally only,
beginning left, but offset 500 pixels from the top of the screen -- without
adding those 500 pixels to the background image itself??



Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: Positioning a background image with CSS... - 03-24-2009 , 04:09 PM






Can't do it that I know of.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Mike" <mike (AT) nospam (DOT) com> wrote

Quote:
What's the syntax to position an image to start tiling horizontally only,
beginning left, but offset 500 pixels from the top of the screen --
without adding those 500 pixels to the background image itself??



Reply With Quote
  #3  
Old   
Mike
 
Posts: n/a

Default Re: Positioning a background image with CSS... - 03-24-2009 , 04:22 PM



Found a way..!

On the body :

background-image:url(/images/bg.jpg);
background-repeat:repeat-x;
background-position:0px 588px;

....where the top of the background image is aligned 588 pixels down from the
top of the viewport.

Is this valid code?

"Murray *ACE*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote

Quote:
Can't do it that I know of.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Mike" <mike (AT) nospam (DOT) com> wrote in message
news:gqbecq$6uv$1 (AT) forums (DOT) macromedia.com...
What's the syntax to position an image to start tiling horizontally only,
beginning left, but offset 500 pixels from the top of the screen --
without adding those 500 pixels to the background image itself?



Reply With Quote
  #4  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Positioning a background image with CSS... - 03-24-2009 , 05:02 PM



..oO(Mike)

Quote:
Found a way..!

On the body :

background-image:url(/images/bg.jpg);
background-repeat:repeat-x;
background-position:0px 588px;

...where the top of the background image is aligned 588 pixels down from the
top of the viewport.

Is this valid code?
Sure. You can even keep it a bit shorter with a shorthand property:

background: url(/images/bg.jpg) repeat-x 0 588px;

Also note that when you use background images, you should also add a
solid background color matching the image, just in case the image can't
be displayed, e.g.

background: #RGB url(/images/bg.jpg) repeat-x 0 588px;

Replace #RGB with the color value of your choice. This ensures that even
without the image the text on it will be readable.

Micha


Reply With Quote
  #5  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: Positioning a background image with CSS... - 03-24-2009 , 05:34 PM



I misinterpreted your question - sorry. I thought you wanted it to repeat
both x and y except for the top 500px.

I see you have the correct solution....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Mike" <mike (AT) nospam (DOT) com> wrote

Quote:
Found a way..!

On the body :

background-image:url(/images/bg.jpg);
background-repeat:repeat-x;
background-position:0px 588px;

...where the top of the background image is aligned 588 pixels down from
the top of the viewport.

Is this valid code?

"Murray *ACE*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote in message
news:gqbeld$75v$1 (AT) forums (DOT) macromedia.com...
Can't do it that I know of.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Mike" <mike (AT) nospam (DOT) com> wrote in message
news:gqbecq$6uv$1 (AT) forums (DOT) macromedia.com...
What's the syntax to position an image to start tiling horizontally
only, beginning left, but offset 500 pixels from the top of the
screen -- without adding those 500 pixels to the background image
itself?




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.