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 2 of 2
  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    1
    Member #
    18945
    Essentials that should be in every css file
    Essential css declarations you can use for your main css file. This sets styles across the board without needing to code it into individual html tags. Modify as needed. Enjoy.

    HTML Code:
    /* Quick hex color reference */
    /* palette
    ?????? - color 1
    ?????? - color 2
    ?????? - color 3
    */
    
    /* Link style */
    a {
    color: blue;
    text-decoration: underline;
    }
    
    /* Body style. Gets rid of the default page margin. */
    body {
    margin: 0px;
    }
    
    /* Set the font used in DIVs */
    div {
    font-size: 10px;
    font-family: Helvetica;
    }
    
    /* Forms have a margin by default that can push your design out undesirably. This gets rid of it. */
    form {
    margin: 0px;
    }
    
    /* Set the font used in form fields */
    input {
    margin: 0px;
    font-size: 10px;
    font-family: Helvetica;
    }
    
    /* Select style */
    select {
    margin: 0px;
    border: 0px;
    font-size: 10px;
    font-family: Helvetica;
    }
    
    /* Gets rid of default cell spacing */
    table {
    border-spacing: 0px;
    }
    
    /* Set the font and removes default padding used in all TDs which usually is most of the site */
    td {
    font-size: 10px;
    font-family: Helvetica; 
    padding: 0px;
    }
    
    /* Set the font and style for textareas */
    textarea { 
    margin: 0px;
    border: 0px;
    background-color: #FFFFFF; 
    font-size: 10px;
    font-family: Helvetica;
    width: 100%;
    }
    
    /* List style */
    ul { 
    margin: 0px;
    text-indent: 0px;
    }
    
    /* List bullet style */
    li {
    list-style-type: square;
    text-indent: 0px;
    }

  2.  

  3. #2
    Senior Member
    Join Date
    Dec 2008
    Posts
    483
    Member #
    17875
    Liked
    1 times
    /*commonly used attribs*/
    *{padding: 0; margin: 0;}
    .top5{margin-top:5px;}
    .top10{margin-top:10px;}
    .top15{margin-top: 15px;}
    .topN5{margin-top: -5px;}
    .topN10{margin-top: -10px;}
    .topN15{margin-top: -15px;}
    .left5{margin-left: 5px;}
    .left10{margin-left: 10px;}
    .left15{margin-left: 15px;}
    .leftN5{margin-left: -5px;}
    .leftN10{margin-left: -10px;}
    .leftN15{margin-left: -15px}
    .bot5{margin-bottom: 5px;}
    .bot10{margin-bottom: 10px;}
    .bot15{margin-bottom: 15px;}
    .lr10{margin-left: 10px; margin-right: 10px;}
    .wide{width: auto;}
    .center{
    display: block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    }
    .right {float: right;}
    .left {float: left;}
    .clear {clear: both;}
    .clearL{clear: left;}
    .clearR{clear: right;}
    .noList{list-style-type: none;}
    a img{outline: none; border: none;}


    I include these in all my projects.
    Makes small things extremely easy.

    need something centered? add class="center"

    need something pushed 15pixels further to the right add "left15"
    need something pushed 15 pixels to the left add "leftN15" N for negative



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 08:20 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com