Jump to content
Killersites Forums

Why do we need the width tag in CSS code?


Recommended Posts

Hello Everyone,

I have a noob question. I'm trying to understand the width tag. Why even use the tag if we have padding, margin, and borders? It seems I can make any of my tags resize anyway I want with those 3 tags. I definitely appreciate your response.

Edited by shavers313
Link to post
Share on other sites

Do you mean the CSS width property?

Check out my CSS course where I get into CSS layout, I go into detail how the horizontal space an element takes is affected by margins, padding and borders. 

That said, with CSS Grid and flexbox, this becomes a non issue but for older browsers, you still need to understand this. Makes sense?

  • Like 1
Link to post
Share on other sites
  • 1 month later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...