Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS what is the purpose of this css code?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31855
    chickentulip
    Member

    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

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

    }

    #57122
    soap
    Participant

    The html tag is the parent to everything..

    #57124
    noahgelman
    Participant

    @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)
  • The forum ‘CSS’ is closed to new topics and replies.