#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2014
    Posts
    5
    Rep Power
    0

    CSS padding and margin on different browsers


    I'm building a website locally and is working on a form. The problem is when viewed on different browsers, the spacing doesn't look the same. I was wondering how each browser treats this spaces. I hope someone can enlighten me on this.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2014
    Posts
    29
    Rep Power
    0
    If you don't tell the CSS what margin and padding to use on an element, the browser agent determines what to use on an element-by-element basis, and there's no gaurentee they will have the same defaults.

    Have you explicitly set the margin and padding on these elements? If not, try that
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    67
    Rep Power
    0
    Try looking up CSS Reset Stylesheets too. It removes all the browser defaults so you're working across a level playing field. The wordpress one is a good place to start and you can customize it to your liking.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2014
    Posts
    5
    Rep Power
    0
    Originally Posted by LindaJeanne
    If you don't tell the CSS what margin and padding to use on an element, the browser agent determines what to use on an element-by-element basis, and there's no gaurentee they will have the same defaults.

    Have you explicitly set the margin and padding on these elements? If not, try that
    I did set the specific margins and paddings.

    Try looking up CSS Reset Stylesheets too. It removes all the browser defaults so you're working across a level playing field. The wordpress one is a good place to start and you can customize it to your liking.
    This might be the answer i'm looking for. I'll go try it out.

IMN logo majestic logo threadwatch logo seochat tools logo