Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Trying to position an image on top of a background


SevenCubed - 11:13 pm on Dec 12, 2012 (gmt 0)


There are various ways to accomplish it, here's one way...

<!DOCTYPE html>
<html lang="en-ca">
<head>
<style type="text/css">
#container{background:url(style/bgtktsearch.jpg) top no-repeat; height:20em; margin:0 auto 0; width:40em;}
#shadow{background:url(style/bgmanmglass.png) no-repeat; height:10em; position:relative; top:9em; left:3em; width:15em;}
</style>
</head>
<body>
<div id="container">
<div id="shadow"></div>
</div>
</body>
</html>

And needless to say make sure your images are in proper folder because the style directory is confusing, I would be looking for an "img" directory, but that's minor as long as your images are actually there.


Thread source:: http://www.webmasterworld.com/css/4527469.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com