Jump to content

Text Positioning


vetmed

Recommended Posts

Hi, this seems like it would be so simple but, I can't figure it out! I have #bodycontainer with a background image and the only text I want to put on it is a few words at the bottom of the container. How do I do that? Thanks!

Link to comment
Share on other sites

Give the div with the background image position:relative, then wrap the text in some kind of tag, like a <p>, <h(1-6)>, <span> and give that element position:absolute, then bottom:0.I.e.<style type="text/css">#container {background: url(http://www.mozilla.org/projects/xbl/xforms/layout/boxes_files/box14.jpg) no-repeat;height: 300px;position: relative;}#container span {position: absolute;bottom:0;}</style></head><body><div id="container"><span>hello<span></div>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...