Horizontal rule with CSS

Solved
tipi75 Posted messages 723 Status Member -  
 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 answers

  1. tipi75 Posted messages 723 Status Member 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
    1. Ricky38 Posted messages 5776 Registration date   Status Contributor 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
    2. alainpre
       

      You need to write :

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