Thread: CSS Help

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    9
    Rep Power
    0

    CSS Help


    Ok guys I need some urgent help with css, which I'm still learning btw,

    I jus want to create 3 sets of tel numbers directly below each other with a line

    height 0.5 space in between.

    I've made a css class which is:


    }

    .para {
    font-family: Times New Roman, Arial, Helvetica, sans-serif;
    font-size: 12pt;
    margin-left: 0px;
    text-align: left;
    line-height: 0.5cm;
    }



    My HTML looks like this:


    <p class="para">Tel: 0555 555 999 </p>

    <p class="para">Mobile: 0555 555 999 </p>

    <p class="para">Fax: 0555 555 999 </p>

    but its not working,

    any ideas?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    17
    Rep Power
    0
    line-height refers to the number that will be multiplied by the current point size, not a specific distance. So if you want it 0.5 then it would be

    line-height:0.5
    no "cm"

    it will take that number and multiply it by your point, and space it according to that.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    9
    Rep Power
    0
    thanks for the reply!

    Is there any other way to get the same format with css at all?
  6. #4
  7. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    add marigin:0; to the css, instead of line-height,

    better yet use a list, more syntactical correct.

    Code:
    css:
    
    .list, .list li {
    font-family: Times New Roman, Arial, Helvetica, sans-serif;
    font-size: 12pt;
    text-align: left;
    list-style:none;
    margin:0;
    padding:0;
    }
    
    
    html:
    
    <ul class="list">
     <li>Tel: 0555 555 999 </li>
     <li>Mobile: 0555 555 999 </li>
     <li>Fax: 0555 555 999 </li>
    </ul>
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    9
    Rep Power
    0
    cool that worked !!

    Thanks guys, much appreciated!!!
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    9
    Rep Power
    0
    the only probelm i got now guys is that the text wont align center.
    Any thoughts?
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    9
    Rep Power
    0
    got it tis ok now thanks!!

IMN logo majestic logo threadwatch logo seochat tools logo