LeonLatex Posted March 7, 2022 Share Posted March 7, 2022 (edited) 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 March 7, 2022 by LeonLatex Quote Link to comment https://forums.phpfreaks.com/topic/314580-wrap-on-html-and-body-is-it-necessary/ Share on other sites More sharing options...
requinix Posted March 7, 2022 Share Posted March 7, 2022 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. Quote Link to comment https://forums.phpfreaks.com/topic/314580-wrap-on-html-and-body-is-it-necessary/#findComment-1594303 Share on other sites More sharing options...
LeonLatex Posted March 7, 2022 Author Share Posted March 7, 2022 (edited) 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 March 7, 2022 by LeonLatex Quote Link to comment https://forums.phpfreaks.com/topic/314580-wrap-on-html-and-body-is-it-necessary/#findComment-1594312 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.