Gosusniper60 Posted February 6, 2006 Share Posted February 6, 2006 I want to set a solid black background on my site, but I want to be able to paste images on top of that as well. If it is possbile, how can I paste the image in an exact spot using coordinates or something? Link to comment Share on other sites More sharing options...
rappo Posted February 6, 2006 Share Posted February 6, 2006 If you want the image to be in the background, you can make an image at just the right size so you put the BG image in the position you want it (using the same background color that you want throughout - black) and use a little bit of CSS, rather than HTML: background: #000 url(link to image) no-repeat; Link to comment Share on other sites More sharing options...
Gosusniper60 Posted February 6, 2006 Author Share Posted February 6, 2006 Ok, and can I just follow the same procedure to add more and more images on my solid black background? And after the url of the image, can't I put 4 numbers telling the image where I want it exactly located?Here is a section of my CSS: BODY { font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; text-align: center; color: #C70000; margin:0px 100px 0px 100px; background-color="black" } So if I wanted to add images and coordinates I would ... Link to comment Share on other sites More sharing options...
scott100 Posted February 6, 2006 Share Posted February 6, 2006 <img src="1.jpg" style="position:absolute;top:100px;left:100px" /><img src="2.jpg" style="position:absolute;top:200px;left:200px" /><img src="3.jpg" style="position:absolute;top:300px;left:300px" /><img src="4.jpg" style="position:absolute;top:400px;left:400px" /> Link to comment Share on other sites More sharing options...
rappo Posted February 7, 2006 Share Posted February 7, 2006 What scott said, but your CSS for the background image is messed up. It would be like this: background-color: #000; Link to comment Share on other sites More sharing options...
Gosusniper60 Posted February 9, 2006 Author Share Posted February 9, 2006 Yes I know, both ways work, I guess the #000 would be better than. BODY { font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; text-align: center; color: #C70000; margin:0px 100px 0px 100px; background-color: #000 url(link) style="position:absolute;top:300px;left:300px"; url(link) style="position:absolute;top:300px;left:300px"; url(link) style="position:absolute;top:300px;left:300px"; no-repeat } This is what I have gathered from you guys if I want to paste images on top of my background colour in a specific spot. Anyone wanna touch up on what I have because I think it is wrong. Link to comment Share on other sites More sharing options...
scott100 Posted February 9, 2006 Share Posted February 9, 2006 Anyone wanna touch up on what I have because I think it is wrong.<{POST_SNAPBACK}> Your code should look like this, the image tags i gave you should go in the body, the rest should go into the <style> in the head section, see below:<html><head><style>body{ font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; text-align: center; color: #C70000; margin:0px 100px 0px 100px; background: #000 url('http://www.google.co.uk/intl/en_uk/images/logo.gif') no-repeat;}</style></head><body>hello<img src="http://w3schools.invisionzone.com/style_images/w3sbanner.gif" style="position:absolute;top:100px;left:100px" /><img src="http://eur.i1.yimg.com/eur.yimg.com/i/eu/hp/yuk1.gif" style="position:absolute;top:200px;left:200px" /><img src="http://img.dell.com/images/global/brand/ui/logo42.gif" style="position:absolute;top:300px;left:300px" /><img src="http://hp.msn.com/c/hotmail/hotmail77x19.gif" style="position:absolute;top:400px;left:400px" /></body></html> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now