jump to navigation

IE and Column Widths March 8, 2011

Posted by Phill in Presentation Layer.
Tags: , , , , , ,
trackback

Uh… hi. It’s been a looooong time since I last wrote here. I’m sorry. I’ve been very busy on a project which uses GWT and Smart GWT. We’ve come across a lot of problems, some of which I hope to blog about.

But what I want to talk about today is something pretty simple: Internet Explorer and column widths. We’ve written a custom component which replaces Smart GWT’s ListGrid – essentially it uses a standard HTML table instead of using DIVs.

Part of the issue we were having is that the column widths were essentially being ignored: IE was just drawing all the columns as equal width. (The CSS on the TABLE element was set as table-layout: fixed).

We were using the HTML COL tag to set the width for each column – all this was added in dynamically via GWT.

As it turns out, the reason IE was ignoring this was because you need to add it to a COLGROUP first. If you add in a COLGROUP, and then add the COL elements to that group, it works.

Advertisement

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.