NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Setting Minimum Width in Relative Width of Table

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 04-05-2006, 05:07 PM THREAD STARTER               #1 (permalink)
Senior Member
 
nasaboy007's Avatar
Join Date: Jul 2005
Location: NJ
Posts: 1,219
nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of
 



Setting Minimum Width in Relative Width of Table


I have a table with a relative width (percentage) so that it will stretch to fill the screen appropriately. The only thing is that in it, i have a row of images that cannot be smaller than the width of the original layout. Because of this, when the browser window is reduced in size, everything shrinks except for the images, which hang out on the sides uglily. heres an excerpt of my code(containing the images that hang out):

Code:
<table height="79" width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
  	  <td class="bordervert"></td>
	  	<td width="18"><img src="img/head2.gif"></td>
<td width="84"><a href="index.shtml" class="headlinks"><img src="img/head3.gif"></a></td>
<td width="86"><a href="academics/index.shtml" class="headlinks"><img src="img/head4.gif"></a></td>
<td width="86"><a href="activities/index.shtml" class="headlinks"><img src="img/head5.gif"></a></td>
<td width="86"><a href="overview/index.shtml" class="headlinks"><img src="img/head6.gif"></a></td>
<td width="86"><a href="pfa/index.shtml" class="headlinks"><img src="img/head7.gif"></a></td>
<td width="86"><a href="events/index.shtml" class="headlinks"><img src="img/head8.gif"></a></td>
<td width="86"><a href="admissions/index.shtml" class="headlinks"><img src="img/head9.gif"></a></td>
<td width="85"><a href="resources/index.shtml" class="headlinks"><img src="img/head10.gif"></a></td>
	<td><img src="img/blank.gif"></td>
	<td width="3"><img src="img/head11.jpg"></td>
	<td class="bordervert"></td>
  </tr>
</table>
i was wondering if there is a way (through either css or html) to set it so that there is a MINIMUM width of the table, meaning that if the browser window is made REALLY small, a horizontal scrolling bar will appear, and prevent the images from flooding over. i still want it to have the percentage value, though, because it needs to fill the higher resolution screens.
nasaboy007 is offline  
Old 04-05-2006, 08:21 PM   #2 (permalink)
NamePros Member
 
CreedFeed's Avatar
Join Date: Apr 2006
Posts: 186
CreedFeed is on a distinguished road
 



Assign a CSS class to the table and in your definition of this class use:

Code:
.class {
    min-width: 100px;
}
This will not work in IE though. In order for this to work in IE, download the following javascript and include it in the header of your page:

http://www.doxdesk.com/software/js/minmax.html
CreedFeed is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 04:02 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger