Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: Css Clear

  1. #1
    Senior Member Noteleklabs's Avatar
    Join Date
    Jun 2012
    Location
    NC
    Posts
    217
    Member #
    31890
    Liked
    28 times
    Ok, so a little while back shovenose told me about a genius way to clear css and I thought I would share it with all of you:
    Code:
    *
    {
    padding:0;
    margin:0;
    }
    shovenose likes this.
    Hey you! Go make something!

  2.  

  3. #2
    Banned
    Join Date
    May 2011
    Location
    Fairfax, CA
    Posts
    2,036
    Member #
    28003
    Liked
    126 times
    Code:
    /* CSS RESET */
    
    * {
      margin: 0;
      padding: 0;
    }
    To quote myself directly.

  4. #3
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    One problem with that, now your <li> won't have bullets, and won't be set in from the left. Same with blockquotes. Also, while you're at it, stop IE from putting a border around linked images:
    Code:
    /* CSS RESET */
    
    *{margin:0;padding:0;}
    li{margin-left:0.5em;}
    blockquote{margin:0 0.5em;}
    img{border:0;}
    Starting to look good.
    m3n0tu18 likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    I always hated the "CSS Resets" because, as Ron said, they don't allow for things such as lists to work properly. Not only that, they pose issues with paragraph tags since they don't allow for a line break between paragraphs...among other things.

    I have a default-css folder where I keep several "resets" and then use "specific-css" to override them on a site-by-site basis when and if needed.
    AlphaMare and m3n0tu18 like this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Banned
    Join Date
    May 2011
    Location
    Fairfax, CA
    Posts
    2,036
    Member #
    28003
    Liked
    126 times
    Quote Originally Posted by Ronald Roe, post: 239677
    One problem with that, now your <li> won't have bullets, and won't be set in from the left. Same with blockquotes. Also, while you're at it, stop IE from putting a border around linked images:
    Code:
    /* CSS RESET */
    
    *{margin:0;padding:0;}
    li{margin-left:0.5em;}
    blockquote{margin:0 0.5em;}
    img{border:0;}
    Starting to look good.
    Definitely a good point about blockquotes and li. But most people will know to fix it.
    Quote Originally Posted by TheGAME1264, post: 239679
    I always hated the "CSS Resets" because, as Ron said, they don't allow for things such as lists to work properly. Not only that, they pose issues with paragraph tags since they don't allow for a line break between paragraphs...among other things.

    I have a default-css folder where I keep several "resets" and then use "specific-css" to override them on a site-by-site basis when and if needed.
    That's an even better idea!

  7. #6
    Senior Member Noteleklabs's Avatar
    Join Date
    Jun 2012
    Location
    NC
    Posts
    217
    Member #
    31890
    Liked
    28 times
    awww you took off my genius picture
    Hey you! Go make something!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:47 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com