The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS help with heading style – dynamic length Re: help with heading style – dynamic length


I can think of a way using negative margins and having the heading have a background of white… but I don’t like negative margins.

In the negative margin case, you would wrap the content below the heading in a div and give it a border-top of the grey line, then put a negative top margin on it to move it up. You would apply a white background to the heading which would cut off the line.