|
Luka
Limit width of table is it possible?April 19, 2012 12:33PM |
Hi,
I am trying to use HTMlPurifier the first time, since I have got CKEditor included on my page.
I am allowing to add a table, but want to limit the max. width of this table. Is there a chance? I have tried the below, but this does not seem to work and I can still add a table with the width of 900px
$config->set('HTML.Allowed', table[width<600|cellpadding|cellspacing|border]);
I can't find a solution, any idea?
|
Re: Limit width of table is it possible? April 19, 2012 01:06PM |
Admin Registered: 6 years ago Posts: 2,632 |
|
Luka
Re: Limit width of table is it possible?April 20, 2012 08:57AM |
|
Re: Limit width of table is it possible? April 20, 2012 01:00PM |
Admin Registered: 6 years ago Posts: 2,632 |
|
Re: Limit width of table is it possible? April 01, 2013 12:46PM |
Registered: 1 year ago Posts: 4 |
|
Re: Limit width of table is it possible? April 01, 2013 04:50PM |
Registered: 5 years ago Posts: 204 |
why not use CSS?
set the max-width of that table or div
div.content-table {
max-width: 600px !important;
}
that way if some uses width greater than 600px inside that div element max-width will reduce it to max of 600px;
|
Re: Limit width of table is it possible? April 01, 2013 09:15PM |
Registered: 1 year ago Posts: 4 |
suggestions: http://jsfiddle.net/8FQKM/1/
|
Re: Limit width of table is it possible? April 02, 2013 02:03PM |
Registered: 5 years ago Posts: 204 |
.content {
max-width: 600px !important;
border:1px solid #444;
}
.content table {
max-width: 594px !important;
border: 3px solid #cecece; /* careful of borders & padding */
display: block;
}