Dotted line code?

Discussion in 'Programming' started by MMM, Mar 31, 2006.

  1. MMM

    MMM Rent This Space...

    4,648
    605
    +12
    Does anyone know what the HTML code is for making the dotted lines like this?:

    -------------------------------------

    We need something similar to:

    Code:
    	<hr size="1" style="color:#FFFFFF" />
    Only in a dotted line style. I've searched many HTML sites with no luck :(
     
    1
  2. PalePhoenix

    PalePhoenix Prince of Dorkness

    11,988
    650
    +29
  3. MMM

    MMM Rent This Space...

    4,648
    605
    +12
    I know it's possible without an image. I've seen it used with Invision forums. The code they used was:

    Code:
    <td width='100%' colspan='3'><div class='row2' style='padding:6px' ></td>
    
    Row2 was:

    Code:
    .row2 { padding: 4px 4px 4px 4px;background-color: #ffffff; }
    I tried to reproduce it but only got a small box :(
     
  4. MMM

    MMM Rent This Space...

    4,648
    605
    +12
    Here is a screenshot of what it looks like.
     

    Attached Files:

  5. KeithMcL

    KeithMcL Freelance Web Designer

    5,728
    790
    +2
    Try this:
    HTML:
    <div class="dottedline">&nbsp;</div>
    HTML:
    .dottedline {
        border-bottom: 1px dotted Black;
    }
     
  6. Wayne Luke

    Wayne Luke Tazmanian

    5,794
    0
    +35
    According to the CSS Recommendation, it should be noted that "dotted" should be represented as:

    ...................

    whereas "dashed" should be represented as

    -----------------------

    Several current browsers have bugs which render "dotted" as "dashed". If you want consistency and the same effect to work in future browsers then you should use the "dashed" attribute on your border and not "dotted". This will preserve your example across different browsers and platforms.
     
  7. KeithMcL

    KeithMcL Freelance Web Designer

    5,728
    790
    +2
    Thanks for clearing that up Wayne.
     
  8. MMM

    MMM Rent This Space...

    4,648
    605
    +12
    Thanks Keith! We will give that a try.

    Also, thanks for the heads up Wayne. We didn't even know there was a dashed/dotted difference. :eek:

    We will follow your suggestion :)
     
Verification:
Draft saved Draft deleted