table auto-size (seemingly) not possible

A place to discuss the testing process in beta cycles or against SVN for the CMS Made Simple CORE package.
Locked
b0n3m4n

table auto-size (seemingly) not possible

Post by b0n3m4n »

Sorry for posting this without having tried it on the latest beta, but I skimmed through the bug tracker items and haven't found it there.

I have trouble with setting a table to auto width. Now if I recall correctly, to do so, you just have to omit the width parameter. But doing so makes the resulting table lose its cellpadding information.

I think the error should be easily reproducible:

1) Content -> Pages -> New Page
2) Use the FCKEditor to generate a table using all the default values
3) Switch to Source Code editor
4) Remove the width = ... tag and set cellpadding to 100
5) Hit preview

For me the table now ignores the cellpadding although the resulting website is completely XHTML-validated. Have I missed an HTML parameter to set the table width on auto? AFAIK if you want it on auto you usually have to omit the width parameter, right?

I have no idea why this happens, as a plain html file with only the code displays correctly.

I don't even know if that can be considered a bug.

Here the code again for a quick test, just copy/paste it into a New Page window in CMSMS.


   
       
             
             
       
       
             
             
       
       
             
             
       
   
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: table auto-size (seemingly) not possible

Post by kermit »

t is probably css "getting in the way", such as this, which i found at the top of one of the default stylesheets:

* {

margin:0;

padding:0;

}

and there was NO styling of tables or table elements elsewhere in that template's stylesheets... as soon as i fired up 'edit css' in the web developer toolbar and stuck td {padding:10px;} at the bottom of the css, i got padding in the cells.

so i guess the answer is, style the tables with css (at least as much as needed to override styles that already exist, and to replace any in-line formatting or styling that won't validate).. either overall (apply to all tables), based on your content div class or id (to limit that table css to just that container), or apply a class or id to the table itself (which you have to go into html view in fckeditor to do) to limit the css to just that table
Last edited by kermit on Fri Mar 30, 2007 8:07 am, edited 1 time in total.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Locked

Return to “[locked] Quality Assurance”