QuoteSep 10, 2009 20:500 likesLike
 

I'm trying to use the HTML editor in the promo block and it's not working.  I want to insert a table and have it centered on the page.  There's no way to do that with the WYSIWYG and if I hand code the center command it strips it out after I save it.  Anyone have any suggestions on how I can get this table centered?  It looks stupid all the way over to the left.

QuoteSep 10, 2009 20:540 likesLike
 

BTW, it saves other stuff.  I was able to go in and adjust the table width and it kept it.  Just not the center code.  And I found a work-around but it sucks as a long-term solution.

QuoteSep 10, 2009 20:560 likesLike
 

Yea, i have run into issues with tables in dolphin all the time. I usally place most of my tables that i need centered inside a div like so.

<div align="center">

<!-- Place Table Here -->

</div>


This works in most cases.

Dolphin Mods - http://www.boonex.com/market/posts/deano92964
QuoteSep 10, 2009 21:010 likesLike
 

Good call on the div tags but I put them in and pressed update and it still didn't save them.  Thanks though!

QuoteSep 10, 2009 23:550 likesLike
 

Give this code a try.  Evertime you make a change. ie, add <tr>'s or <td>'s change width, height, anything!.... make sure you delete every file(except for .htaccess) in your site's /cache directory, or it won't display right.


<table style="border: 0px none; background-color: #000066; color: #ffff00; margin-left: auto; margin-right: auto; width: 100%; height: 100px;" border="0">
<tbody>
<tr>
<td style="text-align: center;">Table Data</td>
<td style="text-align: center;">More Table Data</td>
<td style="text-align: center;">Even More Table Data</td>
<td style="text-align: center;">Too Much Table Data</td>
</tr>
</tbody>
</table>


Stupid TinyMCE editor keeps adding that border="0" after the style tag ... go figure.

You can change the padding around the table, and border color in /templates/base/css/index.css here:

.promo_code_wrapper {
border:1px solid #CCCCCC;
margin-bottom:10px;
padding:10px;

Maybe I should just wait for Dolphin 12
QuoteAug 21, 2011 23:120 likesLike
 

Thank you, hl, you just fixed my homepage for me!

 

P.S. Hey, Dolphin designers, could we get centering to work on tables in page blocks? Just, yanno, for kicks? Kthnx.

QuoteAug 21, 2011 23:250 likesLike
 

I know it's  a total pain in the a$$ but you can add the tags back in from the database side in mysql.

Arvixe Web Hosting / Boonex Community Liaison
QuoteSep 08, 2011 16:410 likesLike
 

<div align="center"><!-- Place Table Here --></div>

this would probably work, but tinyMCE would most likely catch on that this is invalid - or rather, depreciated, code.  Try this instead -

<div style="text-align:center;"><!-- Place Table Here --></div>