Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Website Design
PostPosted: August 28th, 2009, 6:16 pm 
Dragon Member
User avatar
Offline

Joined: November 25th, 2005, 6:49 pm
Posts: 1034
Location: California us
RS Name: Sky Jace
RS Status: P2P
To any web designers out there:

How do I keep my layout at a constant width on widescreen resolutions? The main table I have has a percentage width, so it gets bigger on widescreen. Does anyone know of a way to fix this?

Thanks.

_________________
Image
Image
Dragon Member #90


Top
 Profile  
 
 Post subject: Register and login to get these in-post ads to disappear
PostPosted: August 28th, 2009, 6:16 pm 
Dragon Member

Joined: September 9th, 2004, 1:47am
Posts: 9047
Location: In your web browserz


Top
  
 
 Post subject: Re: Website Design
PostPosted: August 28th, 2009, 9:16 pm 
Adamantite Member
User avatar
Offline

Joined: September 22nd, 2008, 4:51 pm
Posts: 247
Location: Hong Kong hk
RS Name: Crwirey
RS Status: Classic
Should be able to just specify the table width by pixels instead of percentage for example <table width="500"><tr><td>wooooo</td></tr></table> would create a table 500 pixels wide with "wooooo" in it. :D

_________________
Image
||==========||*Code Blue*||==========||
|90/99 Fletching |83/99 Magic |80/99 Defence |73/99 Summoning |3/7 Capes |


Top
 Profile  
 
 Post subject: Re: Website Design
PostPosted: August 28th, 2009, 9:16 pm 
Rsbandb Donor
Offline

Joined: October 25th, 2004, 10:12 pm
Posts: 3055
Location: New Zealand nz
RS Name: Chief. Snake
RS Status: Retired
Clan Name: Bits and Bytes
You may want to try using the max-width CSS property, however this is ignored by IE6- (for modern browsers it's fine). You can see it implemented in RuneWire, where the content expands with the page/window until a certain point and then it stays at that size. In essence it will allow you to set well.. a maximum width! Which works well in conjunction with a percentage width because you can set the maximum to use a different, perhaps more precise measurement such as pixels.

With a table, you'll probably want something like:

<table width="x%" height="x%" style="max-width: 1280px">
[table structure]
</table>

Hopefully this is what you're looking for. :P

_________________


Top
 Profile  
 
 Post subject: Re: Website Design
PostPosted: August 28th, 2009, 11:11 pm 
Runite Member
Offline

Joined: September 3rd, 2007, 12:42 am
Posts: 564
Location: Anchorage, AK
RS Name: Addiv
RS Status: P2P
As long as you have a specific width you can do the following (using Chiefs example). I don't think it'll work with percentage widths however so you'll have to provide a number in the styles section:

<style>
.maxwidth {
max-width:1280px;
width: expression(this.width > 1280 ? 1280: true);
}
</style>

<tablewidth="x%" height="x%" class="maxwidth">
[table structure]
</table>

The first line of the maxlength style is for all browsers but IE, the second is for IE but will work with other browsers.

_________________
Image
SKOTM wins: Herblore | Farming | Mining


Top
 Profile  
 
 Post subject: Re: Website Design
PostPosted: August 29th, 2009, 1:46 pm 
Dragon Member
User avatar
Offline

Joined: November 25th, 2005, 6:49 pm
Posts: 1034
Location: California us
RS Name: Sky Jace
RS Status: P2P
It works! Thanks everyone :D

_________________
Image
Image
Dragon Member #90


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies. Forum Index » Off-Topic » Non-RuneScape Discussion » Tech Talk » Website Design Page 1 of 1 [ 5 posts ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to: