dl alignment issues

Discussion in 'CSS' started by sixrfan, Jul 19, 2011.

  1. #1
    hi, i'm trying to get the dl with the Phone Numbers on this page to appear in the upper right in the same structure/alignment as the attachment but I'm not sure how to go about it.
    asdf.JPG

    here's the html:
    
    <dl id="phones">
        <dt>LOCAL ONLY</dt>
        <dd>202-544-7200</dd>
        <dt>TOLL FREE</dt>
        <dd>877-721-7910</dd>
    </dl>
    
    Code (markup):
    here's the css:
    
    #phones {width: 500px; background:red; color:#FFF;}
    #phones dt {background:green; font-size:10px;}
    #phones dd {background:blue; font-size:32px; text-shadow:2px 1px 3px #000;}
    
    Code (markup):
    I just put the background colors in there to make it easier to figure out what i'm working with.

    any suggestions on how to best go about this?
     
    sixrfan, Jul 19, 2011 IP
  2. WebPageMistakes

    WebPageMistakes Well-Known Member

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    110
    #2
    Set the margins and padding to 0 for the dl.
     
    WebPageMistakes, Jul 19, 2011 IP
  3. sixrfan

    sixrfan Well-Known Member

    Messages:
    354
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    that didnt do anything. please advise.
     
    sixrfan, Jul 20, 2011 IP
  4. WebPageMistakes

    WebPageMistakes Well-Known Member

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    110
    #4
    What happens if you set the top margin of the dl to a minus number, say -10px to start with.

    This is hard to troubleshoot without the whole set of coding. Depending on where in the CSS this is something else might be interfering.
     
    WebPageMistakes, Jul 20, 2011 IP
  5. sixrfan

    sixrfan Well-Known Member

    Messages:
    354
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #5
    i got it figured out now. thanks!
     
    sixrfan, Jul 20, 2011 IP