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
Share on other sites

[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.
Link to comment
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.