Jump to content


Photo

fixed size table


  • Please log in to reply
2 replies to this topic

#1 pneudralics

pneudralics
  • Members
  • PipPipPip
  • Advanced Member
  • 241 posts

Posted 04 April 2006 - 12:54 AM

Is there a way to have a fixed size table?

This is my current:
<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>

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?

#2 Vorotaev

Vorotaev
  • Members
  • PipPip
  • Member
  • 27 posts
  • LocationCanada

Posted 07 April 2006 - 03:01 PM

// Place a number in pixels where # is.
<table style="width: #px;">
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.

#3 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 07 April 2006 - 03:10 PM

[!--quoteo(post=362535:date=Apr 7 2006, 11:01 AM:name=Vorotaev)--][div class=\'quotetop\']QUOTE(Vorotaev @ Apr 7 2006, 11:01 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
// Place a number in pixels where # is.
<table style="width: #px;">
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:
<style type='text/css'>
table {
  width: 300px;
  margin: 0 auto;
  color: #626262;
}
</style>

You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users