Jump to content

Recommended Posts

Posted

I've got a table that floats right inside of a div. If the table is too long, then it extends outside of the div at the bottom. I need the div to simply wrap at the bottom of the table, rather than the table overlap the div. I figured since the table is inside the div there would be no problem, but I was wrong:

 

http://www.unlvrebelyell.com/section.php?ID=3

 

Any ideas? I couldn't find any CSS that would help.

Posted

I've seen this happen with images and such too. I know there's a better way to fix it, but I can't find the article that explains it, unfortunately (I'd like it for my files, actually). The quick & dirty way to do it is to add a non-semantic tag at the end of the div, after the table, and set it to clear the float. Something like:

 

<br style="clear: both;" />

 

I think that sometimes will clear the left and right menu, though. If so, try just adding an empty paragraph after the table:

 

<p> </p>

 

If that screws up your spacing, you can always set the style on that as well:

 

<p style="height: 1px; margin: 0; padding: 0;"> </p>

 

I *think* I've used both these options in the past and they've worked. It would be better to throw all the style stuff into a style sheet, but I can't access source code on this computer so I am not sure if/how you're using CSS. Hope this helps anyway.

  • 2 weeks later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...