I am trying to build a banner at the top of a web page. This banner is just 3 div sections running across the top of the page, a large middle one and 2 little ones on either side. See code here
Because of the back-ground image the middle div size is fixed (1200x129 px). The reason for the 2 little div sections is to center the large middle div. I want it to work for different monitor sizes and so I can’t specify the width of the 2 little div sections, not even in %.
The above code does not work, Does anyone know how I can center this large div in the middle of the page?
Thanks in advance
Code:
<div id="banner">
<table style="background-image: url('images/banner.jpg'); background-repeat: no-repeat; width:100%; float:right; height:129px;">
<div class="left"></div>
<div class="middle" style="background-image: url('banner.jpg'); width:1200px; height:129px;"><label>People and Friends</label></div>
<div class="right" style="background-image: url('strip.jpg'); background-repeat: repeat; height:129px;"></div>
</table>
</div>
The above code does not work, Does anyone know how I can center this large div in the middle of the page?
Thanks in advance
Comment