Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vertical Line 1

Status
Not open for further replies.

LLudlow

Programmer
Oct 5, 2001
186
CA
Is it possible to create a vertical line with Dreamweaver or even with HTML? Or does anyone have any other suggestions on to make one?
 
What or where do you want the line? Live long and make your kids suffer..
 
I wanted to put the line between two sections of text. They are different so i wanted a definitive way to seperate them.
 
You can always use the keyboard | to seperate them. If you have a large amount of text in each section you could do it w/ a table.

Something like:
<tr>
<td>blah blah blah blah</td>
<td width=&quot;1&quot; bgcolor=&quot;cccccc&quot;> </td>
<td>blah blah text two</td>
</tr>
The bgcolor is the color of the line. Adjust the spacing of the text to the borders with the tables cellpadding and cellspacing properties.

You may find that you need to put a spacer gif or something in the middle table to get it to work right (in fact that NEVER hurts). Just one of many ways to do it... but it wouldn't eat up a lot of bandwidth.

Hope it helps! Wow JT that almost looked like you knew what you were doing!
 
Thanks I will try using the extra column in a table
 
Adding a style-sheet border to one of the sections will allow you to insert a dividing line, for instance:

.rightsection { border: black solid; border-width: 0px 0px 0px 1px}

(assuming a 2-column, 1-row table, with the class 'rightsection' applied to the right hand cell.

Regards,

Jon Wilson
 
Hello all!

I will just summarize.

There at least 4 ways of doing this.

1) Create background image with background color as you need and draw a vertical line at the place you need it. Set this image as page (<body>) background.

2) Use layers.
a) you may set layer width to 1px and set background color as you need;
b) put image with verical line inside the layer. Like in the first example, but more flexible to place.

3) Use CSS. Go to CSS Stles window in DW, create new style and on the Border page set solor, width and style.
the example code:
<style type=&quot;text/css&quot;>
<!--
.unnamed1 { border-color: black black black #000000; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 1px}
-->
</style>

4) Use tables. Set some cell's width to desired size and background, like pixl8r wrote. One tip: you must insert some image inside this cell (with transparent color or page background color) which width is set to desires size. Because if you just leave an empty cell with &amp;nbsp; iside - you wan't be able to get 1px width.
Example:
<table width=&quot;300&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td>some text goes here. </td>
<td bgcolor=&quot;#990000&quot;><img src=&quot;transparent.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
<td>another text goes here.</td>
</tr>
</table>


That's it.
Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top