I need to do something like this in css, how to achieve it (look attachment)?
Do I need to use after, before to do something like this or can I do it using only border to do this? Can someone help me with this
Regards
I need to do something like this in css, how to achieve it (look attachment)?
Do I need to use after, before to do something like this or can I do it using only border to do this? Can someone help me with this
Regards
3
Answers
This might help get you started:
<div>
with a border<span>
with a white backgroundposition: relative
You can set the wrapper div position relative. As for the title div, set the position to absolute with left, and right values.
Here’s the code example.
A straightforward solution is to embed the HTML that goes in the square in a
<fieldset>
and use<legend>
for the text over the border. Optionally with
before and after the<legend>
text for extra spacing.