Is it possible to output ON THE BOARDER?

T

typingcat

<div style="position:relative; border:solid 10px;">
<div style="position:absolute; top:0; left:0;">Hello, World!</div>
</div>

The text is displayed INSIDE the boarder. But is it possible to make it
displayed ON the boarder?
 
D

Dylan Parry

Using a pointed stick and pebbles, (e-mail address removed) scraped:

The text is displayed INSIDE the boarder. But is it possible to make it
displayed ON the boarder?

Negative positioning? You could try "top: -0.5em;" which should move the
text up by half of its height. Of course, you should give the text a
background colour otherwise the line will go through it making it hard
to read.
 
J

Jonathan N. Little

<div style="position:relative; border:solid 10px;">
<div style="position:absolute; top:0; left:0;">Hello, World!</div>
</div>

The text is displayed INSIDE the boarder. But is it possible to make it
displayed ON the boarder?
<div style="position:relative; border:10px solid yellow;">
<div style="position:absolute; top: -1em;">
Hello, World!
</div>
...Need something here for the div to have size or style dims...
</div>

Gave border a color else default is black like your text and would not
be visible...
 
M

middletree

In the first place, "border" doesn't have an 'a'. Secondly, perhaps you
want to use a fieldset with legend. Try this:

<fieldset>
<legend>Bob</legend>
Other stuff
</fieldset>
 
M

middletree

I didn't use markup for presentation. The fieldset/legend combo is a
legitimate piece of code.
 
M

Mark Parnell

I didn't use markup for presentation.

You chose the fieldset and legend elements because of the way they are
commonly presented on screen, not because they are semantically correct
in the context under discussion.
The fieldset/legend combo is a
legitimate piece of code.

For groups of form controls and their labels, yes.

BTW: Please quote the relevant parts of the message you are replying to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top