Treehouse: Grow your CSS skills. Land your dream job.

vertical line in html/css?

  • # March 7, 2011 at 1:51 pm

    i want to include a vertical line on my webpage; is there any way of doing this in html/css?

    # March 7, 2011 at 2:13 pm

    One way of doing this to put a left or right border


    p { border-right: 2px solid black; }
    # March 7, 2011 at 2:53 pm

    thanks, i’ll try it.

    # March 7, 2011 at 4:40 pm

    If you have a div element that ‘contains’ the line then you can use a repeating image. If you don’t have a div then you can add one. You can use CSS to position the div WRT min/max height so the line extends from top to bottom.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.