3
I have a <div>
whose edge has a different customization than the pattern. It is not totally solid, it has "open spaces" at the top and bottom.
Example drawn:
The central content varies, so the size of the <div>
also varies.
What I’ve already tried:
- I created 2
<div>
, one underneath with a solid edge and the other on top with a white background, however, it was not practical; - I used pseudo-elements to allocate the border on the right and left, but also not cool because the size varies;
- I used
border-image
, but it wasn’t good either.
Anyone has suggestions?
But is this unbroken part occupied by a text? Is it a title of what you have inside the div? If yes, it uses background on the element h or p that will have the title and positions it using position, z-index and margin. But put the code there to make it easier. If you want to make it easier to help, put it on http://jsfiddle.net/
– Vítor André
@Vítorandré yes, the box content varies. Sometimes it has a title at the top and a text in the middle, or sometimes it is 3 words listed. But the edge layout is this, with the central parts "blank". In fact there will be cases that only the top is blank, the rest the edge remains solid.
– Ricardo
It is not like this example but by your comment does not want a fieldset?
– Tiago Gomes
Pow personal, I did not remember that. He does exactly what I want, thank you very much. I will test here using it then comment as it turned out. Thank you!
– Ricardo