View Single Post
Old 11-26-2012, 06:04 PM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,615
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
I took the liberty to format your code so it’s easier to see where an element starts and ends.

One of the two issues is this, I guess:
Code:
document.getElementById(shID).style.display = 'block';
If you display an element as block-level element it invokes a line break before and after itself.
Secondly, if you want centered text, don’t float it. text-align: center is only working on inline content and not on elements that are floated, because these are basically behaving as block elements.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote