Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
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.
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.
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.
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.