Novice needing some guidance

Discussion in 'CSS' started by giser3546, Oct 17, 2012.

  1. #1
    I have taken some online tutorials and have done a good bit of reading but I'm stumped and probably doing something completely wrong. I'm doing my best to help someone put together a website for a local restaurant and can't seem to get the back ground to work with me. This started as a website theme but we weren't offered enough editing options so I'm trying to manual change it.

    I'm trying to get a background that remains stationary while the text scrolls over it and also does not tile. As it stands now I can get it to either but not both. Currently my style sheet handles it this way.

    {
    background: url(LOCATION OF PIC FILE) repeat fixed;
    height: 610px;
    text-align: center;
    margin: 0 auto;
    overflow: hidden;
    }


    As far as I can tell the height: 610px; limits how far the text can scroll up, which I would like to remain. I have tried to change the "repeat fixed" part and am not getting the results I'd like. I have tried this...

    {
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    height: 610px;
    }

    ... with this in the HTML..

    <div id="intro">
    <img src="IMAGE SOURCE" width="100%" height="100%">
    </div>

    but this doesn't keep the background fixed...


    Once again I am very new and would greatly appreciate any help, Thanks.
     
    Last edited: Oct 17, 2012
    giser3546, Oct 17, 2012 IP
  2. steve0

    steve0 Member

    Messages:
    28
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    for fixed background that doesn't tile - you need to have no-repeat and fixed in the background property.

    What are you applying the CSS styling to? If it was me I'd assign it to the body element, and then have a separate div within the body for the text. To make sure you keep the whole image, you could set a 'min-height:610px' so that the page never shrinks smaller than the image.
     
    steve0, Oct 17, 2012 IP