PDA

View Full Version : [Help - HTML] Banner question



AzuuKaBoom
11-26-2010, 08:23 AM
I am building a website and I was wondering how to make your banner at the top resize when the resolution is bigger or the window size is changed, is it done using html <DIV> tags ?

FlashD
11-29-2010, 08:28 AM
There are many ways to achive this. You can use a normal <table> tag or a <div>, but also JavaScript (if you want to complicate stuff).
The TABLE would look something like this:


<table>
<tbody>
<tr>
<td><img src="image1.jpg" alt="" /></td>
<td style="width: 100%; background: url(image2.jpg)"></td>
<td><img src="image3.jpg" alt="" /></td>
</tr>
</tbody>
</table>


While the DIV would use a very similar approach:


<div style="width: 100%; background: url(image2.jpg)">
<img src="image1.jpg">
<img src="image3.jpg" style="float: right">
</div>


Hope this helps. ^_^

wizz-o-matic
11-29-2010, 09:49 AM
side note: to achieve this your banner must be composed with at least 2 separated images. Main and background. In AF case it uses 3 parts.

Eris
11-29-2010, 12:53 PM
You shouldn't use the table tag for designing your website. CSS is always preferable.

Here is a nice, illustrated read on the subject: http://www.hotdesign.com/seybold/everything.html