Jump to content

BG color and images?


Gosusniper60

Recommended Posts

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

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

<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

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

Anyone wanna touch up on what I have because I think it is wrong.

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...