Is this not supported? Trying to avoid the code bloat of applying this style string to a lot of cells in a table.
You tried just highlighting the column(s) and clicking the center align button in the editor ribbon?
Yes. That just throws in a style="text-align: center;" into every highlighted cell. The opposite of what I was looking for. <wry smile>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You said you wanted to add center aligned to the a column attribute. So I am a confused as to what you are wanting to do.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to *only* have the alignment value in the <col> section, rather than overrides for every cell in the table.
DESIRED:
<table>
<colgroup>
<col style="width: 246.0px; text-align: right;"/>
<col style="width: 84.0px; text-align: center;"/>
<col style="width: 86.0px; text-align: center;"/>
<col style="width: 87.0px; text-align: center;"/>
</colgroup>
<tbody>
<tr>
<th>ITEM</th>
<th>Status</th>
<th>Number</th>
<th>Group</th>
</tr>
<tr>
<td>ITEM</td>
<td>Status</td>
<td>Number</td>
<td>Group</td>
</tr>
<tbody>
<table>
(For about thirty-plus rows.)
----------------------------------
Currently I get this:
<table>
<colgroup>
<col style="width: 246.0p"/>
<col style="width: 84.0px"/>
<col style="width: 86.0px"/>
<col style="width: 87.0px;"/>
</colgroup>
<tbody>
<tr>
<th style="text-align: right;">ITEM</th>
<th style="text-align: center;">Status</th>
<th style="text-align: center;">Number</th>
<th style="text-align: center;">Group</th>
</tr>
<tr>
<td style="text-align: right;">ITEM</td>
<td style="text-align: center;">Status</td>
<td style="text-align: center;">Number</td>
<td style="text-align: center;">Group</td>
</tr>
<tbody>
<table>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are correct that this is not how the editor works. There is no way to make it do what you are asking. You could work around it with good ol' CSS like below, but as for having the editor do it that unfortunately is a no go.
table tbody tr :nth-child(2),table tbody tr :nth-child(3),table tbody tr :nth-child(4){text-align: center;}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah well. :(
If it's not a defect, it's something for the wish list, as it makes the page code a lot smaller.
It is valid HTML! :-)
Thank you
Grant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.