Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-06-2007, 03:48 PM   PM User | #1
spok61438
New Coder

 
Join Date: Sep 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
spok61438 is an unknown quantity at this point
background positioning using css

hi,

I'm trying to get a picture (my background) to sit at the bottom left of the window no matter what resolution the viewer is using. I was wondering It could be done.

my actual css concerning body :
Code:
      body 

           {

	       font:11px verdana, arial, helvetica, sans-serif;

	       color:#222;

	       background-color:white;
	       background-image: url(bg.jpg);
	       background-attachment: fixed;
	       background-position:70%;
	       background-repeat:no-repeat;
my site is : http://fizzmo.dyndns.org:8080

if any other information is necessary just ask.

thanks in advance for your help.
spok61438 is offline   Reply With Quote
Old 07-06-2007, 03:50 PM   PM User | #2
BWiz
Regular Coder

 
BWiz's Avatar
 
Join Date: Mar 2006
Location: Sol System
Posts: 471
Thanks: 7
Thanked 21 Times in 21 Posts
BWiz is an unknown quantity at this point
For me the picture IS set to the bottom left... (using FF2)
__________________
BWiz :: Happy Coding!
2006
2007 2008 2009
2010 2011
Irrational numbers make no sense.
BWiz is offline   Reply With Quote
Old 07-06-2007, 03:53 PM   PM User | #3
CaptainB
Regular Coder

 
Join Date: Jun 2007
Posts: 805
Thanks: 123
Thanked 23 Times in 23 Posts
CaptainB is an unknown quantity at this point
Same here.... (IE6)
CaptainB is offline   Reply With Quote
Old 07-06-2007, 04:04 PM   PM User | #4
interlog
New Coder

 
Join Date: Jul 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
interlog is an unknown quantity at this point
The website doesnt load:S
interlog is offline   Reply With Quote
Old 07-06-2007, 04:46 PM   PM User | #5
spok61438
New Coder

 
Join Date: Sep 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
spok61438 is an unknown quantity at this point
maybe this picture will explain best what i mean

I use FF on the left and Opera on the right (only difference is number of bookmarks in the toolbar, which change the size of the visible window)

spok61438 is offline   Reply With Quote
Old 07-06-2007, 04:49 PM   PM User | #6
BWiz
Regular Coder

 
BWiz's Avatar
 
Join Date: Mar 2006
Location: Sol System
Posts: 471
Thanks: 7
Thanked 21 Times in 21 Posts
BWiz is an unknown quantity at this point
Try this gopher:

Code:
 background-position: bottom;
__________________
BWiz :: Happy Coding!
2006
2007 2008 2009
2010 2011
Irrational numbers make no sense.
BWiz is offline   Reply With Quote
Old 07-06-2007, 05:41 PM   PM User | #7
Graft-Creative
Regular Coder

 
Graft-Creative's Avatar
 
Join Date: Aug 2004
Location: Web Designer - North East Lancashire U.K.
Posts: 842
Thanks: 0
Thanked 0 Times in 0 Posts
Graft-Creative will become famous soon enough
Maybe give this a shot...
Code:
      body {
	       font:11px verdana, arial, helvetica, sans-serif;
	       color:#222;
               background: white url(bg.jpg) bottom left no-repeat;
            }
That will keep the image plugged into the bottom left of the page at all times.

Gary
__________________
'cna ne1 plz giv cod'
Graft-Creative is offline   Reply With Quote
Old 07-07-2007, 03:01 AM   PM User | #8
spok61438
New Coder

 
Join Date: Sep 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
spok61438 is an unknown quantity at this point
I tried both real quick and the proposition from BWiz is working and the other aint.

thank you very much for your help
spok61438 is offline   Reply With Quote
Old 07-07-2007, 12:42 PM   PM User | #9
Graft-Creative
Regular Coder

 
Graft-Creative's Avatar
 
Join Date: Aug 2004
Location: Web Designer - North East Lancashire U.K.
Posts: 842
Thanks: 0
Thanked 0 Times in 0 Posts
Graft-Creative will become famous soon enough
Quote:
Originally Posted by spok61438 View Post
the proposition from BWiz is working and the other aint.
thank you very much for your help
Sorry, I neglected to add 'fixed' into the mix.

Try this:
Code:
      body {
	       font:11px verdana, arial, helvetica, sans-serif;
	       color:#222;
               background: white url(bg.jpg) fixed bottom left no-repeat;
            }
BWiz's method results portions the headphone image being shoved off to the left and out of the viewport at lower resolutions/browser window sizes...the above doesn't - it keeps the image bottom left, without cutting any of it off, whatever the resolution. Try it, you'll see what I mean.

Hope that helps,

Gary

P.s. only tested in FF
__________________
'cna ne1 plz giv cod'
Graft-Creative is offline   Reply With Quote
Old 07-08-2007, 01:53 AM   PM User | #10
spok61438
New Coder

 
Join Date: Sep 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
spok61438 is an unknown quantity at this point
thank you very much for your help dude working as expected

have a good day
spok61438 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

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

Forum Jump


All times are GMT +1. The time now is 08:23 PM.


Advertisement
Log in to turn off these ads.