Hi, I'm running into a weird issue with tables using Danland. If I set the table width using a non-CSS tags like so:

<table width="300" border="1" cellspacing="2" cellpadding="2">

...neither the width nor the padding/spacing are recognized, and the table ends up at 100% width with no margin/padding at all.

If I set it using CSS code style="width: 300px;" etc), it recognizes the proper width on the website...but not in emails sent via Webform.

I have the latest version of CKEditor installed, and the tables display properly in the rich text editor.

I do see in the main Danland style.css file where it has a generic width: 100%; tag, but I tried removing that to no avail.

Any assistance would be much appreciated (awesome theme otherwise, btw!)

Comments

danpros’s picture

Category: bug » support

Hi,

Since I set the table width via style.css you must remove the table style in style.css first

table {
width:100%;
}

Dan

giorgio79’s picture

This setting messes with all my tables. It seems some kind of border is applied as well to all tables.

Can this be made less greedy?

Brainwrap’s picture

Thanks for the speedy response; I mean no disrespect, but I tried this (see my orig. post) and it doesn't seem to work.

It's not a major issue--simply using CSS to set the width does the trick for tables on the site itself--but it makes it impossible to use tables in the custom email settings in Webform (perhaps I'd have to play around with the Webform CSS instead?). Again, not a major issue, and the theme is awesome otherwise, it's just strange.

Plus, why would the Width setting have anything to do with the email not recognizing cell padding/spacing settings anyway?

More puzzling than frustrating, really.

danpros’s picture

Hi,

You can use firebug to know what value that override that, and please report your finding regarding this issues. Sorry but I can not test all issues by myself, I need help from you all to track the issues :).

Dan

Brainwrap’s picture

Understood.

I used Firebug after removing the table { width:100%; } and creating a new page w/table, and again, it still stretched 100%. Using Firebug, I was surprised to discover that the CSS (which still included the 100% wide code) wasn't being generated by the normal style.css file, but by a dynamically-generated (ie, with a long, random-jumble file name) .css file located at /sites/default/files/css/

...along with about 20 other dynamically-generated CSS files...all of which were generated within the past 5 days, even though the site has been being worked on and modified for about 3 months now.

I know that some themes (such as Pixture Reloaded) generate their own CSS files in a similar fashion on the fly, but didn't think that DanLand did that...does this make any sense to you? Is it possible that some module I've added is generating it?

danpros’s picture

Hi,

No way for Danland to do that, currently Danland do not use custom CSS, yes it's possible a module that generate the custom CSS.

To generate custom CSS atleast it need theme-settings.php and Danland do not have that yet (I will considering to add theme settings in the future release).

Dan

Brainwrap’s picture

OK, I figured out where the dynamic CSS files came from--I had enabled CSS optimization in Admin>Performance. Disabling it (and removing the 100% width code in style.css) did HALF the trick.

So, tables now load at the proper width on both the site and in webform messages.

However, it's still not recognizing the Padding/Spacing settings for tables on either the site or the emails.

All tables keep showing up with no cell padding or spacing that I can see, even if they're both set to huge numbers (say, 8px & 8 px).

In this case, I see three possibilities in style.css: Near the top

--lines 11-12:

margin: 0;
padding: 0;

--lines 19-21:

tr.odd td, tr.even td {
padding: 0.5em;
}

--Lines 891-894:

tr td, tr th {
border:1px solid #bbb;
padding: 0 6px;
}

This last seems to match the code generated in the emails. However, when I tried deleting all three of these bits of code, preview tables still show up with 0 padding/0 spacing.

Any thoughts?