Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 12-08-2009
Member
 
Join Date: Nov 2008
Posts: 94
Percentage problem on width of table columns

The table column on my page is set to 15% and the width on the 3 middle columns are 39% each. I don't want to be over 350 pixels in width on table column. It should display smaller size on page.How can I prevent this or overcome this?
Reply With Quote
  #2  
Old 12-08-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: Percentage problem on width of table columns

The table displayed in page is used for page layout?Table-based layouts require a lot more HTML markup than do standards-based layouts. You can set the CSS property "max-width" :
Code:
 <table style="max-width:350px;">
Reply With Quote
  #3  
Old 12-08-2009
Member
 
Join Date: Jan 2009
Posts: 199
Re: Percentage problem on width of table columns

WIDTH = "width expression" Using the width attribute, you can explicitly set the width of your table.
Code:
<TABLE BORDER>
<TR> <TD WIDTH="90%">f</TD> <TD WIDTH="30%">a</TD> </TR>
<TR> <TD>b</TD> <TD>e</TD> </TR>
<TR> <TD>c</TD> <TD>d</TD> </TR>
</TABLE>
When defining a width in pixels, keep in mind the available space on your web page with respect to the screen resolution. This code will make gp means set width of 90 in first row.
Reply With Quote
  #4  
Old 12-08-2009
Member
 
Join Date: Dec 2008
Posts: 177
Re: Percentage problem on width of table columns

A table will not display until ALL of the HTML it has loaded, when set width of table make sure that WIDTH is set as the width of the table cell.When using percentages as values for the width attribute, web browsers will automatically resize your table according to available screen space defined in the screen resolution.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Percentage problem on width of table columns"
Thread Thread Starter Forum Replies Last Post
How to find percentage of columns data in Excel Kungfu Pandey Windows Software 2 07-01-2012 06:20 PM
How to compare two Date values in two different columns of a table Ehtesham SIddiqui Windows Software 1 06-10-2011 11:32 AM
Unable to work with table columns in opera browser when the table has wide layout Janya Technology & Internet 5 27-08-2011 10:53 AM
HTML page table width not working in Firefox Ground 0 Software Development 4 23-08-2010 06:56 PM
How to add or delete columns of table in SQL? Truster Software Development 5 11-01-2010 12:09 PM


All times are GMT +5.5. The time now is 09:59 PM.