Treehouse: Grow your CSS skills. Land your dream job.

what is the purpose of this css code?

  • # March 2, 2011 at 2:11 pm

    Can someone please explain to me what is the purpose of this css code block? (below). it does not make sense to me. what motivates css codes to use html tag at all? in what scenarios, it is necessary? it would be nice to see an article about this tag on this web-site. thank you very much

    {width: 100%;
    text-align: center;
    background: #fff;
    min-height: 100%;
    margin: 0 0 1px 0;


    # March 2, 2011 at 5:48 pm

    The html tag is the parent to everything..

    # March 2, 2011 at 6:10 pm

    @soap, how does that help?

    But yeah, could be for a number of things. the width could be related to some large scalable background, text-align to fix a margin:0 auto IE bug, background just to name the backgound color, min-height for a sticky footer. I’m not so sure about the margin. I can’t immediately think of a reasion to put margin on the html tag.

    But yeah, it all depends on the website

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

You must be logged in to reply to this topic.