CSS div title position

css, html, title

Solution

You can use the `<fieldset>` tag for doing this...

Here's an example...

<fieldset>
    <legend>Div title here...</legend>
</fieldset>

You can edit the `<fieldset>` tag just as a `<div>` in CSS...

Problem

Is it possible to make a div title appear like this: I know that I could the the text "Div Title here" inside a div, give it a solid background and position it with absolute coordinates, but I would like the title to be associated with the div, instead of whole document, so I can move the div without worrying about moving the title. I have set up a fiddle here: http://jsfiddle.net/Eth6U/.

Original source