Grow your CSS skills. Land your dream job.

Is this CSS or JavaScript

  • # September 14, 2009 at 11:21 am

    If you go here http://www.tvguide.com/news you would see that the BG stays and the only thing scrolling is the content. can some tell me how this is done please.

    Regards :)

    # September 14, 2009 at 11:42 am

    its CSS.

    Code:
    background-attachment: fixed;

    add that rule to your body :)

    # September 14, 2009 at 12:32 pm

    How would I place the div Body content in the center of the image?

    Regards

    # September 14, 2009 at 12:33 pm

    By the way greg.mcausland thanks for your help before it works!… :D

    # September 14, 2009 at 5:05 pm
    "3dtoon" wrote:
    By the way greg.mcausland thanks for your help before it works!… :D

    Welcome !

    to center your main content div, all you have to do is give the right-left margins the auto attribute.

    you can write it short hand like so

    Code:
    #container { margin: 0 auto; width: 960px; }

    note, i also added a width value, being the only other pre-requisite for this to work.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".