954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Table breaking div

Hia,

I am trying to redesign my css based design. I now have a header, left floated column, main colum, and a footer that fits along the bottom (I was pleased to get this far).

However when I have a table in the main column, it is liable to break out beneath the left column when the browser window is small (in IE only). This is occuring without fixed widths in the table.

To see the type of page I'm trying to fix, without the floated left column, it is here:
an event list

I have tried at length to find the answer and would greatly appreciate any fresh ideas.

Anax
Newbie Poster
24 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

You can style your table elements with "nowrap" to force the table to be a certain width. That way instead of collapsing when the window is tiny, users will have to scroll instead.

td { white-space: nowrap; }
tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

You can style your table elements with "nowrap" to force the table to be a certain width. That way instead of collapsing when the window is tiny, users will have to scroll instead.

td { white-space: nowrap; }

That didn't quite work (forcing the table out), but it led me to straight to the solution which was

table {
   table-layout: fixed ;
}


Wow! That's a huge relief. Many many thanks!

hmmm I think that might need checking in other browsers/versions

Anax
Newbie Poster
24 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

I discovered it was also necessary to add this when the content was longer

td {

   overflow: visible ;
}
Anax
Newbie Poster
24 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

Couldn't you simply give the table a fixed width?

FC Jamison
Posting Pro in Training
Team Colleague
446 posts since Jun 2004
Reputation Points: 92
Solved Threads: 21
 
Couldn't you simply give the table a fixed width?


But I wanted to keep site as fluid as possible...
I've now gone through joomla and phpBB to remove much of the fixed widths of the s...

You can use link above and navigate about. I've even managed a css footer:)

Anax
Newbie Poster
24 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You