forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject Re: How to create a table with fixed width (and fixed width of the cells)?
Date Wed, 03 Sep 2008 11:12:11 GMT
On Tue, 2008-09-02 at 10:58 -0700, Irrra wrote:
> The problem is still there :(
> 

well, I did not test the css but now I did. In my first response the
display:block was missing. However that is css.

Index: src/documentation/skinconf.xml
===================================================================
--- src/documentation/skinconf.xml	(revision 691565)
+++ src/documentation/skinconf.xml	(working copy)
@@ -186,6 +186,11 @@
       background-color: #f0f0f0;
       font-family: monospace;
     }
+    
+    table.width200{
+      width: 200px;
+      display:block;
+    }
     <!--Example:
         To override the colours of links only in the footer.
     -->
Index: src/documentation/content/xdocs/samples-b/sample.xml
===================================================================
--- src/documentation/content/xdocs/samples-b/sample.xml	(revision
691565)
+++ src/documentation/content/xdocs/samples-b/sample.xml	(working copy)
@@ -339,6 +339,21 @@
             </td>
           </tr>
         </table>
+        <p>
+          And now for a table with a fixed width:
+        </p>
+        <table class="width200">
+          <caption>Table caption</caption>
+          <tr>
+            <th>1</th>
+            <th>2</th>
+            <th>3</th>
+          </tr>
+          <tr>
+            <td>data1</td>
+            <td colspan="2">this data cell spans two columns</td>
+          </tr>
+        </table>

> 
> Thorsten Scherler-3 wrote:
> > 
> > On Mon, 2008-09-01 at 18:38 -0700, Irrra wrote:
> >> Hi, 
> >> 
> >> I have a problem. I need to create several tables of the same (fixed
> >> width) 
> >> with the fixed widths of columns. What I'm getting are tables of the
> >> different width with the widths of the columns different that the ones
> >> I'm
> >> specifying. On the top of that the layout changes when I'm resizing the
> >> window (the width of the table and its columns changes). How to fix it? 
> >> 
> >> I'm working with pelt skin and trying to use something like this:
> >> 
> >> <table width="600">
> > 
> > As you noticed the width attribute is not allowed. You need to use css
> > for it:
> > <table class="width600">
> > 
> > Then add to your skinconf within the <extra-css> block the css
> > definition:
> > table.width600{
> >  width: 600px;
> > }
> > 
> > HTH
> > 
> > salu2
> > 
> >>   <tr align="left" valign="top">
> >>     <td width="400">
> >>        <p>test test test test</p>
> >> </td>
> >>     <td width="200" bgcolor="#FFFFFF"> 
> >> ../resources/images/Fotolia_7868578_XS.jpg </td>
> >>   </tr>
> >> </table>
> >> 
> >> <table width="600">
> >>   <tr align="left" valign="top">
> >>     <td width="200" bgcolor="#FFFFFF">
> >> ../resources/images/Fotolia_2809691_XS.jpg </td>
> >>     <td width="200" bgcolor="#FFFFFF"><p>test</p>
> >>         <p class="regulartext">test</p></td>
> >> <td> 
> >>         <p>test</p>
> >>     </td>
> >> 
> >>   </tr>
> >> </table>
> > -- 
> > Thorsten Scherler                                 thorsten.at.apache.org
> > Open Source Java                      consulting, training and solutions
> > 
> > 
> > 
> 
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Mime
View raw message