Scratching my head a little on this one. Should be a fairly basic, but just dont seem to be able to get it working.
I have the following
header has margin: 0 auto; width: 500px; which horizontally aligns fine. The problem comes with the content in the <ul>; its dynamic and sometimes items are hidden [display:none;]. This gives the visual appearance that the content isn't horizontally aligned. Obviously the problem is with the width:500px.
I just cant see a good alternative other than either using javascript to dynamically set the width of the header when items are hidden or by having various CSS classes for the various widths.
I guess the question is, how would you do this?
I have the following
Code:
<div id="wrapper">
<div id="header">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</div>
header has margin: 0 auto; width: 500px; which horizontally aligns fine. The problem comes with the content in the <ul>; its dynamic and sometimes items are hidden [display:none;]. This gives the visual appearance that the content isn't horizontally aligned. Obviously the problem is with the width:500px.
I just cant see a good alternative other than either using javascript to dynamically set the width of the header when items are hidden or by having various CSS classes for the various widths.
I guess the question is, how would you do this?