Where are HTML wrappers used and what exactly are they? (web design)?

Discussion in 'HTML & Website Design' started by JackyS, Aug 15, 2014.

  1. #1
    I have been learning HTML and CSS programming languages for awhile in order to further my understanding and possible produce my own fully html + css webpage from scratch.
    One thing I still haven't bothered to research is what a wrapper is I mean is it just changing the orientation or shape of an object as it sounds?
     
    JackyS, Aug 15, 2014 IP
  2. hdewantara

    hdewantara Well-Known Member

    Messages:
    538
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #2
    AFAIK it's just an (informal) term in HTML:

    <div class="my-container">
    <p>hello dolly</p>​
    </div>

    In that case, .my-container is the wrapper. It can be a <div>, or something else.
     
    hdewantara, Aug 15, 2014 IP
  3. Sycrid

    Sycrid Well-Known Member

    Messages:
    130
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #3
    From my understanding of them, I use the div tags for breaking down my code, and styling with CSS.

    Effectively the wrapper is what wraps around your code to give it style or apply additional specific code to that section.

    I could be totally wrong, but Google doesn't really answer this when I checked, and it's just my approach. In hdewantara's example, I'd go into CSS and then use "my-container" as a reference for styling. Some people may do this with an initial opening Div to get things started and set basics of a website, e.g. size and width, or basic colours etc.
     
    Sycrid, Aug 15, 2014 IP
  4. ralph-design

    ralph-design Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    From what i was taught, a wrapper is equivalent to a regular div. It's not an "official" tag but people like to make them to wrap the entire content in one div and usually for positioning where the entire content is positioned.

    for ex:

    #wrapper{
    margin: auto;
    }

    The entire content in the wrapper will be centered in the page.
     
    ralph-design, Aug 16, 2014 IP