I’ve stuck on a problem for a while now.
I have a h1 element around which i need à line. Like this :
—– Text —–
The page’s background is an image, so i can’t just use a background-color on my h1 element to hide my text.
I managed to get the result with a three colums table, but i need to set a width for the center cell for it to work.
Is it possibile to get it to work with a dynamic width ?
Thanks in advance.
Finally did it with javascript, i usually don’t like using it when i can avoid it but i couldn’t figure another way and my code is cleaner.
Just used a normal hn with a class which is detected by jQuery.
Then :
– The title is put to display:inline-block, this way the block is only as wide as it’s content and i can’t use the width later.
– The title is put back to block with align:center
– The title is wrapped by a new div
– I create two new div which are placed around the title after calculating what whidth it should use