View Full Version : Dotted lines

10-23-2007, 02:17 PM

Very, very simple question this one. I am building a site and need to separate parts of the site and want to use 'dotted lines' - I need to do both horizontal and vertical. I used the Hr (horizontal rule) tag however I thought you could have dotted, dashed as well as the solid line - however solid is all it gives you. So I created a class for the Hr line - however as well as the dotted line I wanted the code also shows the 'original' solid line underneath the dotted one - which isn't what I'm after.

I also attempted to use a vertical line - the way I did this was to create a Div and give the right hand side a border of 1px and dotted lines - which seems to work OK.

Can anyway let me know how they do their dotted lines - both horizontally and vertically - as I'm not sure if I'm thinking about the execution in the right way,

Many thanks

10-23-2007, 04:22 PM
Look at these examples, it will give you some ideas on using the border property in CSS:
<h2 style="border-bottom: 2px dotted red;">Hello World!</h2>
<p style="border: 4px dashed green; padding: 20px;">This is my paragraph</p>
<div style="border-left: 1px solid black; width: 100px;">Some text<br>More text<br> and more text</div>