1. I've started a massive SPAM purge, any accounts that have spammed are being removed, also for a short period new user signups are disallowed until the SPAM cleaning is finished.

Background sizing

Discussion in '(X)HTML / CSS' started by Gewing2, Oct 20, 2011.

  1. Gewing2

    Gewing2 New Member

    Joined:
    Sep 24, 2011
    Messages:
    112
    Likes Received:
    2
    Trophy Points:
    0
    Hi, I'm using an image for my web background, but I have a little problem. I have to go and size the image correctly in the image editing program for it to look right, but then if you resize the webpage it doesn't look right. Is there a way to make the image automatically resize itself depending on the size of the person's screen?
    Loading...
  2. Elia

    Elia Member

    Joined:
    Nov 17, 2011
    Messages:
    32
    Likes Received:
    2
    Trophy Points:
    8
    Gender:
    Female
    Location:
    Timisoara
    For this job you need your background image to be in CSS. Apply an absolute positioning and set its width at 100%, that should do.
  3. eswari

    eswari New Member

    Joined:
    Sep 10, 2012
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Gender:
    Female
    This following code will be helpful to solve the background option,
    body
    {
    background-image:url('smiley.gif');
    background-repeat:no-repeat;
    background-attachment:fixed;
    }
    and also you can set height:100%; position:absolute;
  4. thietkewebtopx

    thietkewebtopx New Member

    Joined:
    Jan 18, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    You can add class image and CSS following
    body img.image {
    left: 0;
    min-height: 768px;
    min-width: 1152px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: -2;
    }
    I hopewill helpyou. :)

Share This Page