Jump to content

fixed size table


pneudralics

Recommended Posts

Is there a way to have a fixed size table?

This is my current:
[code]
<div style="background-color: #8AB3CE; text-align:center; padding-top:5px; padding-bottom:5px;">
<span><b>MY CURRENT TABLE</b></span>
<table style="width:100%; height:100%;">
<tr>
<td style="font-size:6pt;text-align:right;width:100%;">
IF THIS TEXT WAS ONLY A SENTENCE THEN THE TABLE WILL ONLY EXPAND TO HOW MUCH TEXT THERE IS.
</td>
</tr>
</table>
</div>
[/code]

I'll like to have a fixed table...? Where I can have 1 letter and it'll be the same size as me having 20 sentences. Any clues?
Link to comment
https://forums.phpfreaks.com/topic/6529-fixed-size-table/
Share on other sites

[!--quoteo(post=362535:date=Apr 7 2006, 11:01 AM:name=Vorotaev)--][div class=\'quotetop\']QUOTE(Vorotaev @ Apr 7 2006, 11:01 AM) [snapback]362535[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code] // Place a number in pixels where # is.
<table style="width: #px;">[/code]
Um... yeah? That seems to me to be the simplest and most effective way to create a fixed-size table. Unless I'm misunderstanding your question, in which case please feel free to clarify.
[/quote]

exactly, but i'd recommend going with a CSS approach so that you could modify every aspect of your table without having to update your markup:
[code]
<style type='text/css'>
table {
  width: 300px;
  margin: 0 auto;
  color: #626262;
}
</style>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/6529-fixed-size-table/#findComment-24767
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.