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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOPEFULLY SIMPLE 1

Status
Not open for further replies.

rry2k

Programmer
Jun 28, 2001
678
US
Hi,

Is there a way to put a box around text, then make it sunken like a picture frame in VB.

Thanks..Russ
 
Hi Russ,

There are some ways to do this:

with [red]style="BORDER-BOTTOM: inset 7pt yellow;"[/red] you can set a border arround some elements.

inset = type of the border
(you can also use : dotted - dashed - solid - double - groove - ridge - outset)
7pt = width of the border
yellow = the color

You can also set the BORDER-TOP, BORDER-LEFT and BORDER-RIGHT or the complete border with BORDER-STYLE

some examples:

Code:
<H4 style=&quot;BORDER-BOTTOM: inset 7pt yellow;BORDER-RIGHT: solid 3pt red;BORDER-LEFT: outset 9pt black;BORDER-TOP: dashed 6pt green&quot;>text in Header </H4>

Code:
<DIV style=&quot;BORDER-BOTTOM: inset 7pt yellow;BORDER-RIGHT: solid 3pt red;BORDER-LEFT: outset 9pt black;BORDER-TOP: dashed 6pt green&quot;>text in Div </DIV>

But these examples gives a border to the complete with of the screen. You can make a table around your text to place your text somwhere on the screen and make the border only around the text.

Here is another example:

Code:
<table align=&quot;center&quot; width=&quot;200&quot; border=&quot;2&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; height=&quot;200&quot; bordercolor=&quot;#000000&quot;>
    <tr height=&quot;90&quot;>
    </tr>
    <tr>
			<td width=&quot;50&quot; height=&quot;20&quot;></td>           	
			<td align=&quot;center&quot; valign=&quot;center&quot; width=&quot;100&quot; height=&quot;20&quot; style=&quot;BORDER-BOTTOM: inset 7pt yellow;BORDER-RIGHT: solid 3pt red;BORDER-LEFT: outset 9pt black;BORDER-TOP: groove 6pt green&quot;>Text in table
           	</td>
           	<td width=&quot;50&quot; height=&quot;20&quot;></td>
    </tr>
    <tr height=&quot;90&quot;>
    </tr>
</table>


Off course there are more ways, so use your fantasy.

Hope this helps you,
Erik
 
Hi Russ,

You can also set the width of a <DIV style> en use <center> as well:

Code:
<center><Div style=&quot;width: 160; BORDER-BOTTOM: inset 7pt yellow;BORDER-RIGHT: inset 3pt red;BORDER-LEFT: inset 3pt black;BORDER-TOP: solid 3pt green&quot;>Tekst in Div with center</div><center>

Erik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top