SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict jodmcc's Avatar
    Join Date
    Dec 2003
    Location
    Houston, Texas
    Posts
    227
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Definition Lists

    I am using a definition list to show the name of a dessert followed by the type of crust filling, etc. How do I format the name of dessert< dt> and the other info about each< dd>? I have the HTML Utopia book but it doesn't show a definition list. Would it be setup this way?

    dl{
    font-family: Georgia, Times New Roman, serif;
    font-size: 14px;
    font-color: blue;
    }

    dd{
    font-family: Georgia, Times New Roman, serif;
    font-size: 11px;
    font-color: black;
    }

    Any help would be appreciated.

    Thanks,

    John

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Why don't you try it and see - shouldn't take more than a few minutes to work it out

    Code:
    dl{
    font-family: Georgia, Times New Roman, serif;
    font-size: 24px;
    color:blue;
    }
    dd{
    font-size: 11px;
    color: red;
    }
    dt {
    font-size: 18px;
    color: green;
    }
    The font family only needs to be defined once unless you are going to change it. There is no font-color its just color:green etc.

    If you define the size and the color in the dl then you don't need to define the dt. If you define the dt as in my example then the values in that style take precedence.

    Paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •