Position image at the bottom of container for IE

V

VUNETdotUS

My div has a width 100px. My images has the same width. Image is a
background curve for the bottom of the div container. How do I
position it perfectly attached to the bottom right/left corners in IE
when left:0px;bottom:0px produce no perfect result (I see the space at
the bottom)
Thanks
 
E

Els

VUNETdotUS said:
My div has a width 100px. My images has the same width. Image is a
background curve for the bottom of the div container. How do I
position it perfectly attached to the bottom right/left corners in IE
when left:0px;bottom:0px produce no perfect result (I see the space at
the bottom)

By using background images as background images?

element#id{
background:url(image.jpg) no-repeat bottom left;
}

Always perfectly attached, no whitespace, and easy to swap by a
different image for all pages at once in the case of a redesign later.
 
E

Els

Els said:
background:url(image.jpg) no-repeat bottom left;

Sorry, make that background:url(image.jpg) no-repeat left bottom;
(first horizontal, then vertical position)
 
N

Nik Coughlin

Els said:
Sorry, make that background:url(image.jpg) no-repeat left bottom;
(first horizontal, then vertical position)

I never knew that! I always use bottom left, it works and the validator
doesn't complain. You learn something every day :)
 
E

Els

Nik said:
I never knew that! I always use bottom left, it works and the validator
doesn't complain. You learn something every day :)

Yes, bottom left works because it's pretty explicit, but for example
40px 200px would have undesired results ;-)
 
V

VUNETdotUS

Sorry, make that background:url(image.jpg) no-repeat left bottom;
(first horizontal, then vertical position)

what if I already have a background? can I use 3 backgrounds in one
element for top,left, bottom?
 
E

Els

VUNETdotUS said:
what if I already have a background? can I use 3 backgrounds in one
element for top,left, bottom?

Not in the current CSS support, no. But you can nest divs. As it so
happens, Nik just started on a nice tutorial on how to do this for
fluent design: http://nrkn.com/index.html

For fixed width, you'll probably (depending on the design of course)
need only three divs: top, middle, bottom.

Also, you can re-use divs you're already using anyway, such as the
header for the top border and corners, the footer for the bottom ones,
and the container around the page for the repeated background in the
middle.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top