Table Problems

5 posts by 4 authors in: Forums > CMS Builder
Last Post: September 7, 2009   (RSS)

By yallaf1 - September 7, 2009 - edited: September 7, 2009

Hi
Having some troubles with getting tables to look as they are in wysiwyg when they are published.
Attached image below (TABLES PROBLEM.jpg) explains the situation.
I create a table (imported from Word) which looks good in the Admin wysiwyg however when publishing - the width which I set at 500px is correct but no matter what I do (including setting the height of the table - see attached jpeg - the spacing between rows "stretches" to double spacing and thus I would like to know :
1. How to control the row spacing so that the spacing is how it looks in wysiwyg?
2. Most effective way to control the height of a table?
3. Best practice for using tables in CMSB?

An example with the table in question can be seen here:
http://www.yallaf1.com/storiesDetail.php?Raikkonen-wins-Spa-Fisi-scores-big-for-Force-India-335

Thanx in advance for any input.
Cheers
PV
Attachments:

tables-problem.jpg 140K

Re: [yallaf1] Table Problems

Hi, PV.

1. How to control the row spacing so that the spacing is how it looks in wysiwyg?


Your table cells contain paragraph tags. The wysiwyg editor doesn't apply these automatically, so the person entering the data must have selected the text and applied the paragraph tag in the editor. The extra height in the table cells is caused by the following rule in your CSS file:
P { LINE-HEIGHT: 20px; PADDING-BOTTOM: 6px; }

If all of your tables are to have the same formatting, you can add this in the stylse sheet, after the above tag:
td p {
line-height: normal;
margin: 0px;
padding: 0px;
}

You can define the table class in your style sheet, then enter that class when setting up the table in the CMS editor.

2. Most effective way to control the height of a table?


I never attempt to control the height of a table. This W3C link might be of use:
http://tinyurl.com/5ernll

Hope that helps.
Deborah

Re: [yallaf1] Table Problems

Hi, All.

Just wondering - is there a way to set up a new, additional <p> style that doesn't have such a large space underneath, so that this new style appears as an option in the format dropdown menu?
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] Table Problems

By Chris - September 7, 2009

Hi Nigel,

[url http://www.interactivetools.com/forum/gforum.cgi?do=post_view&post=58380]This forum post[/url] has instructions on how to add custom CSS styles to the WYSIWYG editor.

I hope this helps! :)
All the best,
Chris