Jump to content

WRAP on HTML and BODY - Is it necessary


LeonLatex

Recommended Posts

Is it absolutely necessary with a wrap on HTML and BODY as long as you have a wrap on all DIV boxes / elements that are otherwise on the page? My wrap on both of these only has 100% on width and height, maybe padding, but I do not quite see the need to have a wrap CLASS on HTML and BODY at all. All my FLEX boxes are fixed or flex, and it makes no difference when I scale the page with or without flex on BODY and HTML. If it were to be to sew together elements / content on the page, this is done by position, margin and align property. If I'm wrong, please explain why? I can find no good explanation for why.

If anyone should ask themselves why I wonder and i have done this, it is because I read about it on one of many pages I have read through, but of course I will not find it again. I mean there was a reason there too. But as usual there are sites for it and some sites not.

e.g. then I found this one, but I do not get wise to it.

wrapping everything inside the <body> in a <div> (usually classed or id as 'wrapper') you enable yourself to repeat HTML tags multiple times without your page structure breaking down.

Edited by LeonLatex
Link to comment
Share on other sites

What "wrap"?

DIVs have no inherent meaning and contribute nothing to structure. Default CSS rules aside, their sole purpose is to allow you to group elements together under a single parent, and thus apply CSS or behavior to the whole group as a unit.

Link to comment
Share on other sites

5 hours ago, requinix said:

What "wrap"?

DIVs have no inherent meaning and contribute nothing to structure. Default CSS rules aside, their sole purpose is to allow you to group elements together under a single parent, and thus apply CSS or behavior to the whole group as a unit.


That was what I needed to hear. Still a little confused, but I understand. I read a lot of information every day to learn and familiarize myself with something other than CSS1, and there is a lot of confusing info. Therefore, I ask. Sometimes i ask a question i already know the answere on to. Thats because i neaded a confirmation on what i already knew. I also see that you requinix open by asking me a question. Assume that this was only to open up for your answer. I understand that you understood what I ment by the way you answered me. And the way you explained to me what I really believed/already knew, but which I needed to get a confirmation of. Thanks 🙂
This is how I use CSS, to style and set up / have control over the layout / design.
(so much has happened to CSS through CSS2 and CSS3 - so much new since CSS1)

Edited by LeonLatex
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.