Horizontal rule with CSS

Solved
tipi75 Posted messages 723 Status Membre -  
 alainpre -
Hello,

I can't seem to create a horizontal line with CSS.

Thank you for your help
Configuration: Windows XP Firefox 3.5.2

6 réponses

tipi75 Posted messages 723 Status Membre 27
 
I have a problem when I try to increase the width, nothing happens.

Here is the HTML code:

<div class="trait_dessus"><hr></div>
<div class="trait_dessus"><hr></div>

Here is the CSS code:

#trait_dessus
{
border-top: 1px solid #000;
width : 700px;
}

Thank you for your help
7
Ricky38 Posted messages 5776 Registration date   Status Contributeur Last intervention   1 463
 
Your code is not correct
It should read id instead of class
<div id="trait_dessus"><hr></div> <div id="trait_dessus"><hr></div> Here is the CSS code: #trait_dessus { border-top: 1px solid #000; width : 700px; } 


and remove your hr you don't need it
1
alainpre
 

You need to write :

.trait_dessus { border-top: 1px solid #000; width : 700px; } 
0