homepage Welcome to WebmasterWorld Guest from 54.198.130.203
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Align DIV Background Img
Explicit




msg:1196135
 5:02 pm on Feb 17, 2003 (gmt 0)

Is there a way to align the div background img to the bottom of the div?
I have this:
<div style="background-image: url(web1.gif); background-repeat: no-repeat" id="content">
And want the web1.gif to be stuck to the bottom of the div?

 

Birdman




msg:1196136
 5:37 pm on Feb 17, 2003 (gmt 0)

background position [w3schools.com] will do what you are looking for.

Birdman

Explicit




msg:1196137
 5:40 pm on Feb 17, 2003 (gmt 0)

So it willwork with a div instead of the whole page?

Birdman




msg:1196138
 5:44 pm on Feb 17, 2003 (gmt 0)

It should, but I haven't tried it. Notice it's only supported by Netscape browser versions 6 and up.

andreasfriedrich




msg:1196139
 5:51 pm on Feb 17, 2003 (gmt 0)

Welcome to WebmasterWorld [webmasterworld.com] Explicit.

Be sure to read Marcia`s WebmasterWorld Welcome and Guide to the Basics [webmasterworld.com] post.

You might want to read Nick´s CSS Crash Course - Part 3 - Color and background properties [webmasterworld.com].

It works in IE as well, Birdman.

Andreas

DCElliott




msg:1196140
 5:44 pm on Feb 18, 2003 (gmt 0)

There are cross-browser issues, though.
Gecko browsers correctly interpret fixed background placement relative to the viewport (per the standard), whereas IE interprets it relative to the div. Look up Eric Meyer's complexspiral demonstration to see this more clearly.

DE

Explicit




msg:1196141
 3:51 am on Feb 20, 2003 (gmt 0)

It seems to work fine... I'm not really to much of a newbie I just couldn't think of how to do it.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved