Jump to content

[SOLVED] background-position: bottom left


fanfavorite

Recommended Posts

Hey all,

 

I am trying to figure out how to make a background image to position at the bottom of the page after scrolling.  I can position it on all browsers right at the bottom of the page before scrolling.  Here is the code I am using:

 

#container {

margin:0px auto;

height:100%;

background-image:url(images/blue/bglines.jpg');

background-position: bottom left;

background-repeat: no-repeat;

background-color: #01172b;

width:804px;

 

height: 100% is also specified in the html, body { } section.   

 

The height also is dynamic, so I cannot put a specified height. 

 

Thanks.

 

-JC

Link to comment
Share on other sites

Thanks, I tried that.  It only works in IE7.  What I have above works the same in all browsers, but only goes by the height of the browser.  Meaning that it starts at the bottom of the browser not the bottom of the page.  Is there any way to make to start at the very bottom of the page? 

Link to comment
Share on other sites

Thanks, I tried that.  It only works in IE7.  What I have above works the same in all browsers, but only goes by the height of the browser.  Meaning that it starts at the bottom of the browser not the bottom of the page.  Is there any way to make to start at the very bottom of the page? 

 

actually it displays fine and accurately in: IE6, IE7, and FFv2.0.11. try my example below and you will see that the image alway continuously is at the bottom left corner of the web page.

 

<style type="text/css">

BODY {background:url('http://www.google.com/intl/en_ALL/images/logo.gif') no-repeat 0% 100%; background-attachment:fixed}

</style>

<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>

Link to comment
Share on other sites

Thanks bud, didn't try your example yet, but found my own solution.  If I remove height: 100% and add display:table, it works on all browsers.  IE7, Safari, FF, Opera and Netscape.  I haven't tested earlier versions yet, but I am sure it will be just minor hacks if any. 

 

#container {

margin:0px auto;

display:table;

background-image:url('http://www.anothertakestudios.com/images/blue/bglines.jpg');

background-position: bottom right;

background-repeat: no-repeat;

background-color: #01172b;

width:804px;

}

 

Thanks for your help! 

Link to comment
Share on other sites

If I remove height: 100% and add display:table, it works on all browsers.

 

Unfortunately, it won't work in IE6 because display:table is not supported. Depends if you are bothered about IE6 support, and besides, you can target IE6 specifically to produce a compromise you're happy with...not always necessary to handicap your project in all browsers just because of IE6 ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.