Jump to content

[SOLVED] table in a table


The_eXXe

Recommended Posts

Hi guys!

 

Think that you have a table or layer. how can we set the width of the table/layer static?

Some of you may say, setting width to some value. Ok it is for text. Layer or table will not go larger than the width itself.

 

What if you have a table or an image in a layer with width is larger than the layer/table?

 

I am really tired, exausted if there is a mistake in my english, sorry. I will attach a picture to make this problem much more clear.

 

The text in the picture called "A Few About Myself" is coming from database with HTML codes. I have provided a wysiwyg editor to let them make some HTML things. But think user made a table with width is larger than I expect (shown as in picture). Do you have any idea how to solve this situation?

 

First I was thinking parsing the string and find table width in it and change the size to maximum value which does not exceed the limit of the page, before writing to database. It looks like a little messy. Do you have any suggestion?

 

Thanks. Any help or at least help attempts will be appriciated  ;D

 

[attachment deleted by admin]

Link to comment
Share on other sites

First put in a <div> like this:

 

<div style='width: 350px; overflow : auto; padding: 5px;'>Then put user's table here</div>

 

Just change the width of the div to whatever you need, it will scroll automatically and not get too big.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.