Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML & CSS: How to style an HR tag to have a title embedded in it

Tags:

html

css

I'm trying to create an HR that follows the below model:

-----<title>-------------------------------------------------

This is a fairly common UI pattern but I'm not finding an example for how to make this work in HTML. Does anyone have any ideas or even pointers to examples? I've been googling it this morning and haven't found what I need so far.

Oh, and additionally I want it for a set of form inputs.

thanks!

like image 785
jaydel Avatar asked Dec 28 '22 00:12

jaydel


1 Answers

<fieldset>
     <legend>title</legend>
</fieldset>

You could then apply CSS to these elements to get the desired effect

like image 65
Curtis Avatar answered May 25 '23 02:05

Curtis