Search
Tuesday, October 16, 2018 ..:: Home ::.. Register  Login

Peter Henry on Facebook  Peter Henry on LinkedIn  Peter Henry on Twitter

   Calendar  
     
  
   Search  
     
  
   Blogroll  
     
  
   Disclosure  
All blog entries are the opinions of the author and do not necessarily reflect the opinions of their employer. All the code presented is for explanation and demonstration purposes only. Any damages incurred to your site and/or data are not the responsibility of the author. Every effort is taken to ensure the code properly compiles, however sometimes there are some hiccups and you might be required to do your own debugging.
     
  
   TechTidBits (Blog)  

Quick Reference: CSS

Mar 2

Written by:
Monday, March 02, 2009 10:11 PM  RssIcon

Are you using proper CSS in your web pages?  If you are, good for you!  If not, then here's a couple invaluable links, please read on.

I'm told (and read) that table formatting your web pages is dead.  RIP.  The new way is with CSS, div and span tags.  Chances are you've seen CSS before, inline, in a separate file, etc.  But have you really done your homework and poked around with CSS?  If you're like me, you might have decided it's about time you learned a bit more.  So here goes! :>

MSDN: Introcution to CSS

Summary:

  • reference a style in the head tag, inline or in an external file (again, put in the head tag)
    • <link href="MyStyleRocks.css" type="text/css" rel="STYLESHEET" />
  • o prefix, just html tags followed by { and } will give you your formatting
  • Class naming notation starts with dot
    • ex ".important {font-family:Arial;}"
  • Uniquely change one html element by ID attribute using the pound
    • ex #title{font-size: 22pt;} and have the html be <div>id="title">My Title</div>
    • even though you might have the div tag with another set of properties, the pound one wins
  • to have multipe tags sharing the same formating/definitions, separate tags with commas
  • to have nested tags (only format the title class in the div tag, separate with spaces
  • div .title {font-family: Verdana; }
Grab a coffee and get coding! :>

Tags:
Categories:
Location: Blogs Parent Separator TechTidBits

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
     
  
Copyright 1999-2012 by PCHenry.com   Terms Of Use  Privacy Statement