I'm building a website for an artist that needs to be able to post either a statement, gallery, video, or poetry content.

I have a list of tab-able content that is generated based on wether not that there is content in that category (ex: the statement tab exists only when there's statement content, same for video, same for gallery, same for poetry.)

What I need to do is dynamically add in a little CSS snippet based on how many items are the in tab list because the site is responsive.

When all four categories exist, they are 25% width of the container.

What I would like is to use PHP to find out how many list items long that list is for that page and, say if there are 3 list items I would like their width to be 33.3% of the container.

Any ideas?

EDIT: Here is the list HTML

```
<ul class="jquery-tabs">

<?php if ( $statementTrue == true ) : ?>
    <li><a class="statement-tab" href="#statement-tab">statement</a></li>
<?php endif; ?>

<?php if ( $galleryTrue == true ) : ?>
    <li><a class="gallery-tab" href="#gallery-tab">gallery</a></li>
<?php endif; ?>

<?php if ( $videoTrue == true ) : ?>
    <li><a class="video-tab" href="#video-tab">video</a></li>
<?php endif; ?>

<?php if ( $poetryTrue == true ) : ?>
    <li><a class="poetry-tab" href="#poetry-tab">poetry</a></li>
<?php endif; ?>

</ul>

```