I have an h2 tag and two spans that I want to all appear on the same line, the h2 text on the left, one of the spans in the middle and the other span on the right. If I wasn’t using an h2 then I know I’d be able to do:
Well with your HTML set up like that, float one <span> left, float one <span> right, and give both of them like…a 20% width.
Then don’t float the 3rd span, but give it this: margin:0 20%;
It’s used in Pauls 3col layout technique.
That’s the example I gave in the OP that only works for spans however it’s not spans that I’m trying to do it with. I’m trying to acheive the same thing but with an <h2> and two <spans>. This obviously doesn’t work in the first instance because the h2 will get pushed to a separate line.