Welcome to WebmasterWorld Guest from 54.197.94.141

Forum Moderators: not2easy

Message Too Old, No Replies

Align DIV Background Img

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

10+ Year Member



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?
5:37 pm on Feb 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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

Birdman

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

10+ Year Member



So it willwork with a div instead of the whole page?
5:44 pm on Feb 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It should, but I haven't tried it. Notice it's only supported by Netscape browser versions 6 and up.
5:51 pm on Feb 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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

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

10+ Year Member



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

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

10+ Year Member



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

Featured Threads

Hot Threads This Week

Hot Threads This Month