www.webdeveloper.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2006
    Posts
    89

    Unhappy Creating a vertical dotted line?

    I can make a horizontal dotted line by:

    HTML Code:
    <hr size="1" style="border-style:dotted;">
    But I want to create a vertical dotted line as well. Is this possible? I can create dividers using tables but I want them to be dotted as well.
    Last edited by meinsla; 09-05-2006 at 12:37 PM.
    "It'll could only cost you your life--and you got that for free."
    Forgotten Games

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    border-left and border-right can be styled.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  3. #3
    Join Date
    Aug 2006
    Posts
    89
    Does that work for DIV tags or maybe something else? Because I already tried it on tables and it didn't work for me. I tried something like:

    HTML Code:
    <table border="1" height ="500" style="border-left-style:dotted;">
        <tr>
            <td>bla bla bla
            </td>
        </tr>
    </table>
    But there is no change in the style in my browser.
    "It'll could only cost you your life--and you got that for free."
    Forgotten Games

  4. #4
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    Quote Originally Posted by meinsla
    Does that work for DIV tags or maybe something else? Because I already tried it on tables and it didn't work for me. I tried something like:

    HTML Code:
    <table border="1" height ="500" style="border-left-style:dotted;">
        <tr>
            <td>bla bla bla
            </td>
        </tr>
    </table>
    But there is no change in the style in my browser.
    Well, your CSS syntax is incorrect to begin with. I do not think that "border-left-style:dotted;" does anything. I'd not waste my time giving a TABLE a special border if all I wanted was a vertical dotted line

    But what the heck, -go it the easy way and use a <DIV> and style it's left or it's right border. Here, a very narrow DIV with a heavy (4-px wide dotted) black border, positioned 50-px from the left of screen, and 10-px from the top.

    <div style="position:relative; left:50px; top:10px; width:4px; height:500px; border-right:4px dotted black;"></div>

  5. #5
    Join Date
    Aug 2006
    Posts
    89
    I know that YOU don't care about using a table but I DO care and would appreciate some help. The syntax in not incorrect, though it just doesn't do exactly what I want it to (see attached file) it dots some of the border not all of it. Either way, the div does seem the better way to go so thanks.
    Attached Images Attached Images
    "It'll could only cost you your life--and you got that for free."
    Forgotten Games

  6. #6
    Join Date
    Sep 2006
    Posts
    5
    This might be a browser issue - your code works in IE but not Firefox. I could get it working in Firefox by explicitly stating width and color.

    Try something like this:

    border-left:2px dotted black;

  7. #7
    Join Date
    May 2006
    Posts
    135
    Code:
    .a1{height:200px;width:1px;display:inline;border-left:1px dotted red;}
    HTML Code:
    <div class="a1">&nbsp;</div>
    try that?

  8. #8
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    It's because your border isn't fully defined. Also, different browsers have different dot pitches and Fx uses a very fine one. Anyway, this works for both but using "dashed" instead of "dotted" produces a more similar look between IE and Fx:

    style="border-left:1px dotted red;"
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles