I have a dynamically created header on a page. Sometimes, there are left and right buttons to the sides of it, sometimes only left or right, and sometimes none.
Is there a way to center the main text and keep it centered when adding other elements next to it? Currently, when I add the left/right buttons, the whole assembly is centered. If I only add one button, the whole thing is shifted off to one side.
How do I keep the main element centered but add other elements around it?
This works fine:
<h1>
<img src="left.png" />
Main Title
<img src="right.png" />
</h1>
This doesn't work:
<h1>
<img src="left.png" />
Main Title
</h1>
`. Anyway, do you know something about css?
– maurelio79 Jan 07 '14 at 03:55