HighDots Forums  

centering background image

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss centering background image in the Macromedia Dreamweaver forum.



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

Default centering background image - 07-12-2004 , 12:31 PM






can somebody explain how i can center an image, say 640 pixels by 480 pixels,
on a page, but centered both top to bottom and left to right. or how can i
make an image my background, BUT WITHOUT having it extend a few times over.
like if i have a page that is 640 by 480, and an image that is 640 by 480, how
can i make it my background and keeping it to show only once , even if the
viewers browser is bigger? thanks


Reply With Quote
  #2  
Old   
Evisuuuu
 
Posts: n/a

Default Re: centering background image - 07-12-2004 , 12:43 PM






Think with CSS it will work
"oepx" <webforumsuser (AT) macromedia (DOT) com> schreef in bericht
news:ccuedl$ee4$1 (AT) forums (DOT) macromedia.com...
Quote:
can somebody explain how i can center an image, say 640 pixels by 480
pixels,
on a page, but centered both top to bottom and left to right. or how can
i
make an image my background, BUT WITHOUT having it extend a few times
over.
like if i have a page that is 640 by 480, and an image that is 640 by 480,
how
can i make it my background and keeping it to show only once , even if the
viewers browser is bigger? thanks




Reply With Quote
  #3  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: centering background image - 07-12-2004 , 12:57 PM



body { background-position:center center; background-repeat:no-repeat; }

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Evisuuuu" <No_spam (AT) thnx (DOT) no> wrote

Quote:
Think with CSS it will work
"oepx" <webforumsuser (AT) macromedia (DOT) com> schreef in bericht
news:ccuedl$ee4$1 (AT) forums (DOT) macromedia.com...
can somebody explain how i can center an image, say 640 pixels by 480
pixels,
on a page, but centered both top to bottom and left to right. or how
can
i
make an image my background, BUT WITHOUT having it extend a few times
over.
like if i have a page that is 640 by 480, and an image that is 640 by
480,
how
can i make it my background and keeping it to show only once , even if
the
viewers browser is bigger? thanks






Reply With Quote
  #4  
Old   
Gary White
 
Posts: n/a

Default Re: centering background image - 07-12-2004 , 04:44 PM



On Mon, 12 Jul 2004 12:57:38 -0400, "Murray *TMM*"
<forums (AT) HAHAgreat-web-sights (DOT) com> wrote:

Quote:
body { background-position:center center; background-repeat:no-repeat; }

That's a problem for cross browser rendering. Depending on the browser
and whether the page is rendered in standards mode or quirks mode, the
background image may be centered vertically in the browser viewport or
in the page content. If the content doesn't exactly fill the browser
windows, you will get differing results in different browsers.

The major browsers (at least on the Windows platform) are pretty
consistent about rendering the background image in the center of the
browser viewport if you use background-attachment: fixed in addition to
the above.


Gary


Reply With Quote
  #5  
Old   
:. Nadia .:
 
Posts: n/a

Default Re: centering background image - 07-12-2004 , 08:02 PM



"oepx" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
can somebody explain how i can center an image, say 640 pixels by 480
pixels,
on a page, but centered both top to bottom and left to right. or how can
i
make an image my background, BUT WITHOUT having it extend a few times
over.
like if i have a page that is 640 by 480, and an image that is 640 by 480,
how
can i make it my background and keeping it to show only once , even if the
viewers browser is bigger? thanks

see if this is of any use to you:
http://www.dreamweaverresources.com/tutorials/pagebackgrounds/examplefixedbackground.htm
there are a few other background image tutorials there as well.

--
Nadia
---------------
:Free Templates !! Dropdown Menu Designs:
http://www.DreamweaverResources.com
:Templates: Free Nav Bar Sets:
:Tutorials : Ecommerce : SEO Articles :
-----------------





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.