Jump to content

Image CSS problem


quelle

Recommended Posts

I have <img> element called right after <body> one. The image element includes following id with attributes and serves as a background of whole page(body) with possibility of resizing(thats the function of this part of code):

 

 

#img.source-image {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

 

 

 

How come this image overrides following id's background

 

 

#mainPicture
{
clear:both;
width:670px;
height:345px;
background-color:#160306;
}

 

And not just this id, every div which includes id from css with background

 

What I want is actually this picture to be under everything

Link to comment
Share on other sites

Background image isnt resizable, and in my case trick works based on browser size

background images ARE resizeable in CSS.  What the OP seems to need is background-size: cover;

I obviously missed somewhere the part where i say without CSS 3 please

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.