Monday, 3 March 2014

Design: CSS - consideration

  • Body:
    • background color
    • font family
    • consider to set the padding & margin. Because some browsers have their own margin & padding settings
  • Wrapper div just under body
    • set the margin to align content  in the center
    • background color
    • set padding so that content doest not appear exactly align with border. normally 2%.
    • set the width so that it is around a4 size page.
    • In order to align all the divs in the center, you have to margin: 0 auto & set the fixed width.
  • Elements
    • Heading
      • align the text to appear in the center
      • font size
      • font color
      • text-decoration
    • Paragraph
      • consider padding
    • Image
      • align in the center normally
      • max-width set it to be 100% and width & height is normally auto
    • Margin & padding:
      • In order to reset the default margin and padding of browser, header, navigation, ul, li, both are set to zero.
    • Float: In order float to work need to set the width as well otherwise browser set the width 100% and it thinks there is nothing to float. In order to display background color with float, use a clear div after floating div and set width & height both.
    • Position:
  • Navigation
    • background color
    • setting the height of navigation is important then it is easy to set the margin and padding.
    • round border
    • Navigation UL
      • change list-style
      • make some space in the left with margin
      • padding
    • Navigation ul li a
      • font color
      • display type
      • normally link float left to each other. 
      • consider text decoration
      • Hover:
        • Background color 
      • Active
        • Background color

No comments:

Post a Comment