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!

Form Outlin 2

Status
Not open for further replies.

twcman

Programmer
Jun 28, 2001
284
US
I have a no brainer. Once upon a time I used a tag that "outlines" an area of text. You could also put a text title in the upper left corner and the "outline" would stop for the title and then resume around the text.

Can someone please refresh this tired persons memory as to what this tag is.

Thanks. The only dumb questions are the ones that are never asked
 
<fieldset style=&quot;width:200;height:100;&quot;>
<legend>I'm stopping you!</legend>
The inside text.
</fieldset>

Rick
 
Can't believe I didnt know that!! :-(


twcman you can also add a touch of style to that::

<fieldset style=&quot;width:200;height:100; border: solid 1px blue&quot;>
<legend style=&quot;border: solid 1px blue&quot;>&nbsp;Legend Here&nbsp;</legend>
<br>
<p align=&quot;center&quot;>Text here</p>
<br>
</fieldset>



É

endamcg-logo1b.gif

 
Hi Cian,

I tried something similar, with a background-color for both the fieldset end the legend. But the background-color for the fieldset shoot out the top-border.

So I made this:

<div style=&quot;width:200; height:100; background-color:lightgreen; border:solid 1px red;&quot;>
<nobr><div style=&quot;position:relative; left:5px; top:-10px; width:10px; border:solid 1px blue; background-color:yellow; color:eek:range;&quot;>
&nbsp;Legend Here&nbsp;
<br>
</div></nobr>
<p align=&quot;center&quot;>Text here</p>
<br>
</div>

BTW: in your example (and mine too), adding a &amp;nbsp; before and after the legend text, looks better to me.

twcman,
This is an alternative for the fieldset/legend without extra styles:

<div style=&quot;width:200; height:100; border: solid 1px red;&quot;>
<nobr><div style=&quot;position:relative; left:5px; top:-10px; width:10px; border: 0px; background-color:white;&quot;>
&nbsp;Legend Here&nbsp;
<br>
</div></nobr>
<p align=&quot;center&quot;>Text here</p>
<br>
</div>

Erik
<!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Hi erik,

Good job, works well! Can the legend be centered? it wouldn't work in the fieldset example but might be simpler in your example.

U spotted the &amp;nbsp; , I forgot it doesnt display here!
yeah, it looks better aliright.

Useful little script isn't it?


É

endamcg-logo1b.gif

 
Hi Cian,

yes you can center the legend :)

<div style=&quot;width:200; height:100; background-color:lightgreen; border: solid 1px red&quot;>
<nobr><center><div style=&quot;position:relative; erase the 'left:5px;' here top:-10px; width:10px; border: solid 1px blue; background-color:yellow; color:eek:range;&quot;>
&amp;nbsp;Legend Here&amp;nbsp;
<br>
</div></center></nobr>
<p align=&quot;center&quot;>Text here</p>
<br>
</div>

Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Hi Erik,

yeah I got it, but I just changed it to left: 50px without the center tags. works fine to.

And with the fieldset its very simply align=&quot;center&quot; in the legend, problem is my editor is telling me thats not to the HTML specification that it can only be left, right, top, bottom? Doesn't really matter I suppose.


É

endamcg-logo1b.gif

 
Highlt thankful to all the people posted the replies for that problem. I really touched the peak of it...

Thanks again Momin ho to bay taigh bhee lerta hay sipahee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top