Problem with 100% table height

User 212117 Photo


Registered User
10 posts

Hi folks

Since upgrading to the new version of the HTML editor, I can't get 'background' tables with a 100% height setting to extend ad infinitum and fill the browser window (something I did regularly before the upgrade). See http://www.contact-your-customers.com/r … ple_aug09/ for an example.

I asked support for advice two days ago, but have heard nothing since. Can anyone help?

Thanks in advance

George
User 3004957 Photo


Registered User
848 posts

I have looked at your code and there is a problem with the table elements. By the looks of it you used the table wizard to create them. This would explain why there are no "" present in the code, which is why none of it works properly. Browsers do their best to render the page in 'quirks mode' but can't do it properly. See this example from your code:

<TABLE border=0 cellSpacing=0 cellPadding=0 width=610 height=100>


This should read:

<TABLE border="0" cellSpacing="0" cellPadding="0" width="610" height="100%">


This is a known issue and should be fixed in a future update.

One thing you should take into account is that setting height to 100% is a proprietary attribute anyway, which means most browsers will ignore it. There are far better ways of implementing what you want to do, CSS styles being one of them.

Dave.
User 212117 Photo


Registered User
10 posts

Dave, thanks for such a prompt reply. You're right, I did (and do) use the table wizard, which has always worked successfully in this context. Do I now have to manually add the "" to the individual attributes for every table?

The reason I don't use CSS is because the page is an HTML email, and using CSS can have dire implications for the deliverability of an HTML email. Hence the use of tables.

Rgds

George
User 212117 Photo


Registered User
10 posts

Dave, I've just noticed that the table causing me a problem does have "" around the two specified attributes of height and width, yet the table is not extending to 100% height. All of the rest of the layout is working perfectly well.

Any further thoughts?

George
User 148353 Photo


Ambassador
808 posts

You need to make sure you use the "" around all attributes. Leaving them off the
<table border=0
can mess up the rest of the attributes.
"Time heals everything. Know who said that? My Latin teacher at barber college!"
- Floyd Lawson

Widoktadwat - "Plays Well With Others"

User 3004957 Photo


Registered User
848 posts

George, what Lowell said.

Just one " out of place can break the whole page. Code has these rules for a reason and they must be followed if the page is to render as you intend it.

As for CSS and compatibility, I use in-line styles on html email and have no problems at all. Because the rendering engine in all modern Windows-based email clients is Trident (as used in Internet Explorer), if it shows OK in IE then it will show fine in those mail clients. As for third-party email clients, I would say that most are fully compliant (all up-to-date clients that is) and will render styles faithfully, which is much more likely than they will outdated and proprietary code like height attributes.

Just my 2 cents.

Dave.
User 212117 Photo


Registered User
10 posts

Thanks both Lowell and Dave.

Dave, thanks also for your comments on CSS. I don't have anywhere near your depth of knowledge, and have been following the almost universal advice (particularly from commercial email delivery platforms) to avoid CSS.

What I do find puzzling and frustrating is that I have been using CC HTML Editor without any of these problems for 3 years, until the recent upgrade.

George
User 3004957 Photo


Registered User
848 posts

Universal advice to avoid CSS? Wow, I haven't heard that one. Perhaps in the very early days when browsers were all trying to wag the dog by the tail with their own way of rendering code but lately CSS is the one standard all browsers try to adhere to. I cannot think of one reason to use standard tags over CSS, even for quick sites. I have a standard style sheet I just modify slightly for each site I do and it takes almost no time at all to change the entire look, shape and feel of a site simply by tweaking the style sheet. I'll never go back, though I understand you wanting to stick with what you know - you can't really go wrong as even thought the older coding formats are deprecated, there is no sign of them being ignored by browsers altogether, so both ways have just as much validity as each other.

After putting in the effort to learn CSS, I'll stick with that for the time being, even though I'm only a hobby coder.

Dave.
User 3004957 Photo


Registered User
848 posts

Hey George,

I've never done mass HTML email campaigns before, but I can see where reverting to old techniques can alleviate some problems between various clients. I took at look at the page you're designing, and the most likely cause of the problem is the XHTML doctype declaration. Because the height attribute was deprecated out of this version, the browser just ignores it and the table doesn't appear the way you want. A quick way to test this is to just remove the doctype completely and see if that helps.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.