Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2018-09-23 04:42:37

Ken
Member
Registered: 2013-03-16
Posts: 314
Website

Table color problem

I have a table on one of my web pages. In BL1 the table had alternating colored rows. When I upgraded to BL2, the table rows no longer display color. I specified in the page template, typography, tables, alternating colors for the rows. The border color works but not the rows. I assumed, apparently incorrectly, that the table-striped even odd settings controlled the row colors. Any ideas on how to control the row colors?

Offline

#2 2018-09-23 04:51:37

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Table color problem

Hi Ken,

I probably need to make this more clear in the interface. To use the striped colors, you need to apply the "table-striped" class to the table. For example:

<table class="table-striped">

	<thead>
		<tr>
			<td>Column 01</td>
			<td>Column 02</td>
			<td>Column 03</td>
		</tr>		
	</thead>

	<tbody>

		<tr>
			<td>Col 01, Row 01</td>
			<td>Col 02, Row 01</td>
			<td>Col 03, Row 01</td>
		</tr>		

		<tr>
			<td>Col 01, Row 02</td>
			<td>Col 02, Row 02</td>
			<td>Col 03, Row 02</td>
		</tr>		

	</tbody>

</table>

Matt

The Turning Gate, http://theturninggate.net

Offline

#3 2018-09-23 05:10:05

Ken
Member
Registered: 2013-03-16
Posts: 314
Website

Re: Table color problem

Thanks, that worked. Appreciate all of your help.

Offline

#4 2019-01-02 23:37:45

tomowensphoto
Member
From: Suffolk
Registered: 2012-11-21
Posts: 321
Website

Re: Table color problem

Hi Ken and Matt,
Happy 2019 to you.
I saw this thread and it helped be sort out my Exhibitions page https://tomowens.openpoint.co.uk/exhibitions/
Now, I noticed Ken's tables all align in terms of columns but not in mine. I wanted to use the table-striped feature as it makes reading easier.
I cannot see anything in Ken's source that suggests controlling column widths as per another sticky on table formatting but if I try and use column widths then the striped feature goes awry as does some content placement.
Other than by padding content in the columns, how do I align my tables so that column widths line up on the example page above?
Grateful as always for any pointers.


Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/

Offline

#5 2019-01-03 02:16:59

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Table color problem

Hey Tom,

I don't have an answer to why yours aren't lining up by default, but you could add some custom css to set the width of the first data cell. It seems that will get the other two to fall in line.

td:first-child {
    width: 60%;
}

Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#6 2019-01-03 02:54:53

tomowensphoto
Member
From: Suffolk
Registered: 2012-11-21
Posts: 321
Website

Re: Table color problem

Thanks Rod,
I'll try that and see what happens.


Regards,
TomO
Just a simple photographer
Live site at http://tomowens.openpoint.co.uk/

Offline

Board footer

Powered by FluxBB