Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screenwidth

Status
Not open for further replies.

lode

Programmer
Nov 8, 2001
208
BE
When i look to some (professionel) sites, i see they center the content of the pages in the middle of the screen.
On a 17" monitor i see on the left and right sight some space.
On a 15" monitor there's no space or just a little bit but you can always see the whole content without horizontal scrollbars.
What i want is a banner on top of my page that always stays centered, so looking on a 15" monitor means that a part of the left side and a part of the right side is not visible.

A good example is Thanks
 
lode,

your answer is in the page's source code!

First there's
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot; height=&quot;260&quot; align=&quot;center&quot;>

then the logo itself..
<td colspan=&quot;7&quot;><img src=&quot;images/index_logo.jpg&quot; width=&quot;750&quot; height=&quot;175&quot; border=&quot;0&quot;></td>
</tr>

The use of percentage widths means that the full width will always be filled no matter what the screen resolution is.
However, you often don't want gifs etc to be that flexible else they look misshapen. To avoid this on your example, the logo is a set width, centered and the colours at each side blended to almost match the background.. you can just see the join.

There are also settings to remove margin height on all 4 sides in your example... these are IE proriety tags and will not work on Netscape.. but if you use CSS and set all the page margins to 0 then that should remove all your 'white space' around the edges.

Hope that all makes sense

luds
 
Hi luds,

Thank you so much for your quick reply,
I will try it out tommorrow !!

Thanks again !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top