Jump to content

CSS Background wont show


Azii

Recommended Posts

Hello.

i dont get why my background in my Container isn't showing even to i've done margins in it that works

http://2.1m.yt/vLtNTHjtR.png (The code proving that it can find the image)

http://4.1m.yt/-dSNxBFUD.png (The result of that coding)

 

but when i write in the body of the html it looks like this http://2.1m.yt/3SNtkz42G.png

http://1.1m.yt/4EDAmTcZS.png (then thats the result)

 

even tho i write in the lower "tier" div it's still inside the margin aswell but it's suppose to be a background right?

 

 

and with this code

 

<style>body { background-image: url("Images/Background/Wall.jpg"); background-repeat: no-repeat; background-position: right top; margin-right: 200px;}

</style>

 

inside the html it works perfectly but thats not where i want the code to be :(

 

Sorry if i make no sense but i tried my best in explaining it :)

Link to comment
Share on other sites

It works for body because its width and height will be that of browser window, being a block element it will be the width available to it, buty ou have no height set for container so without any content the height will be zero, causing image not to be seen.

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...