|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
thanks for the reply!
Is there any other way to get the same format with css at all? |
|
#4
|
||||
|
||||
|
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>
|
|
#5
|
|||
|
|||
|
cool that worked !!
Thanks guys, much appreciated!!! |
|
#6
|
|||
|
|||
|
the only probelm i got now guys is that the text wont align center.
Any thoughts? |
|
#7
|
|||
|
|||
|
got it tis ok now thanks!!
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|