Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: Benoit Baldwin
No one has to use it.
Well, of course not. But we have to see it if others choose to post with it.

If people start setting their left and right margins manually in their style sheets to provide indentation on pages which don't use your TABLE template, then when we view a page with your template, your table tries to use 100% of the space. Which means that it will always overflow on the right side by the same amount as the CSS indent was specified for.

It seems that articles posted in this style need to have a way of determining any pre-existing margin settings and inheriting them properly before determining the width to use for the TABLE template.
20 posted on 09/30/2001 11:29:41 AM PDT by George W. Bush
[ Post Reply | Private Reply | To 18 | View Replies ]


To: George W. Bush; John Robinson

>If people start setting their left and right margins 
>manually in their style sheets to provide indentation on 
>pages which don't use your TABLE template, then when we 
>view a page with your template, your table tries to use 
>100% of the space. Which means that it will always 
>overflow on the right side by the same amount as the CSS
>indent was specified for.

True.

This is the problem with using CSS; it's a huge can of worms thanks to the majority of browsers in use today having incomplete or buggy implementations. Most sites use the compromise of tables for layout, and style mostly for fonts and color.

Some posters here copy and paste the text of articles, and insert <p>'s as necessary, while others copy and paste the full HTML source--the latter posts may be adversely affected by CSS in use here.


>It seems that articles posted in this style need to have a
>way of determining any pre-existing margin settings and 
>inheriting them properly before determining the width to
>use for the TABLE template. 

In the case of the template I'm using, the fix is simple: omit the main table's width specification--the main table will then inherit the width of its container, which, in the current situation, is DIV.body.

Here is the default template I'll use from now on. It yields, at 640x480 and 12 point Times New Roman (the default for a majority of users), a paragraph width of roughly 52 characters, and a margin of roughly 2 em (all sans CSS):

 
<!-- BEGIN TEMPLATE --> 
<table bgcolor="#999999" border=0 cellpadding=0 cellspacing=0>
 <tr>
  <td width="5%">
   <br>
  </td>
  <td width="60%">
   <table bgcolor="#000000" border=0 cellpadding=0 cellspacing=1>
    <tr>
     <td>
      <table bgcolor="#FFFFFF" border=0 cellpadding="20%" cellspacing=1>
       <tr>
        <td>

         <!-- Put the article's HTML here -->

        </td>
       </tr>
      </table>
     </td>
    </tr>
   </table>
  </td>
  <td width="35%">
   <br>
  </td>
 </tr>
</table>
<!-- END TEMPLATE -->    

21 posted on 09/30/2001 8:44:02 PM PDT by Benoit Baldwin
[ Post Reply | Private Reply | To 20 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson