CSS Gurus - Which one is correct?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • The Dawg
    Confirmed User
    • Apr 2002
    • 2438

    #1

    CSS Gurus - Which one is correct?

    HTML:

    Code:
    <nav id="horizontal">
    ....
    CSS:
    Code:
    #horizontal ul {
    	font-family: 'Century Gothic';
    	font-size: 14px;
    	font-weight: bold;
    	letter-spacing: 3px;
    	line-height: 20px;
    	list-style-type: none;
    }
    
    #horizontal li a {
    	color:hsl(212, 100%, 70%);
    	text-decoration:none;
    }
    
    #horizontal li a:hover {
    	color: hsl(212, 100%, 29%);
    }
    Or

    Code:
    #horizontal ul {
    	font-family: 'Century Gothic';
    	font-size: 14px;
    	font-weight: bold;
    	letter-spacing: 3px;
    	line-height: 20px;
    	list-style-type: none;
    }
    
    #horizontal [B][SIZE="6"]ul[/SIZE][/B] li a {
    	color:hsl(212, 100%, 70%);
    	text-decoration:none;
    }
    
    #horizontal [B][SIZE="6"]ul[/SIZE][/B] li a:hover {
    	color: hsl(212, 100%, 29%);
    }

    Both seem to work...
  • Webmaster Advertising
    So Fucking Banned
    • Sep 2003
    • 1360

    #2
    Both are correct, unless you are utilizing 'specify' in the code/CSS too but even then, both are correct.

    Comment

    • PornMD
      Mainstream Businessman
      • Jan 2007
      • 9291

      #3
      They're both correct, but I suppose if you had an ol with different li stylings, you would want to do it the 2nd way.
      Want to crush it in mainstream with Facebook ads? Hit me up.

      Comment

      • The Dawg
        Confirmed User
        • Apr 2002
        • 2438

        #4
        Thanks, just trying to get my html5 / css3 conventions right.

        Comment

        • Killswitch
          REVOLUTIONARY
          • Oct 2012
          • 2571

          #5
          I always go second method that way I know what's being styled properly.

          Comment

          Working...