#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    1
    Rep Power
    0

    Exclamation What is the "a" for in the following code?


    Hi,

    I am learning CSS by an online tutorial. I am confused about what the letter a is doing in the following CSS:

    This is what I am talking about:
    a{height:44px;display:block;}

    The a appears to not have a purpose. I tried removing it and it did nothing to the rendered script.

    Just curious.

    Thanks!

    <!DOCTYPE html>
    <html>
    <head>
    <style>
    #navlist{position:relative;}
    #navlist li{margin:0;padding:0;list-style:none;position:absolute;top:0;}
    #navlist li, #navlist a{height:44px;display:block;}
  2. #2
  3. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,932
    Rep Power
    4033
    The a is part of the selector, limiting it to only a tags.

    #navlist a is the selector in question which would find all A tags that are under the #navlist element.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud

IMN logo majestic logo threadwatch logo seochat tools logo