How can I fit padding?

I have seen left side padding something big from right.
then I search google i found one solve

  • {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    but I want to fit without *{…

Hi @arnabchakma2021,

Can you share the link of your code to have a better look? Also know that the solution you found is often use because it avoids the unexpected design behavior. Like this, it is the developer who decides the external and internal margins of each element.

1 Like

yes I can,
codepen link
and sorry for I had forgot to share codepen link.

No problem @arnabchakma2021 thanks for the link. Can you explain again what is the issue with the padding? I don’t think I understood well the problem

Yes I can see the left padding is big from right side. How can same both?
and Kindly read my first post above

Why? It is a perfectly normal selector to use, in fact, I’d suggest always using it. No point in making size calculations more difficult than they have to be.

Otherwise, you have to subtract the border and padding from the default styles on the form elements. The default styles are also not necessarily guaranteed to be the same in all browsers.

#contact input {
  /* remove border from width */
  width: calc(100% - 4px);

#contact textarea {
  /* remove border and padding from width */
  width: calc(100% - 6px);

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.