Welcome to WebmasterWorld Guest from 54.158.214.111

Forum Moderators: not2easy

Message Too Old, No Replies

Align DIV Background Img

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

New User

10+ Year Member

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 22, 2002
posts:2546
votes: 0


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

Birdman

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

New User

10+ Year Member

joined:Feb 17, 2003
posts:11
votes: 0


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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 22, 2002
posts:2546
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 22, 2002
posts:1782
votes: 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 Nicks 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)

New User

10+ Year Member

joined:Jan 27, 2003
posts:28
votes: 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

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

New User

10+ Year Member

joined:Feb 17, 2003
posts:11
votes: 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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members