How Not To Style Category List Table

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
stevevyse
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Oct 17, 2011 3:11 pm
Location: Shoreham-by-Sea, West Sussex UK

How Not To Style Category List Table

Postby stevevyse » Tue Feb 07, 2017 10:38 am

Hi,

using some custom CSS I wish to change the styling of all the tables in articles within specific category, BUT leave the Category List table unchanged.

This is an example of an article in that category to which some custom styling has been applied.

http://ccwdev.electricfarm.co.uk/the-regatta/archives/2016-results-archive/610-ccw-2016-results-xod-1

However the following is the Category List view - you can see that the custom styling that helps with the article tables really spoils things here.

http://ccwdev.electricfarm.co.uk/the-regatta/archives/2016-results-archive

So far I have used the following in my custom css file:

Code: Select all

.itemid-2947 table {
font-size: 10px;
border: 1px solid #f2f5f5;
}


My problem is that this also impacts on how the category list view table is styled - I want this to remain unaltered.

Following a suggestion from elsewhere I have tried the following which is intended to exclude the category list table:

Code: Select all

.itemid-2947 {
   table {
      &:not(.category) {
         font-size: 10px;
      }
   }
}


But this is not working and I can't see why... are there any wise heads out there that can spot the error?

Steve V

wikivle
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Aug 05, 2017 12:52 pm

Re: How Not To Style Category List Table

Postby wikivle » Sun Aug 06, 2017 6:23 am

Steve, did you find a solution to this?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 23664
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: How Not To Style Category List Table

Postby Per Yngve Berg » Sun Aug 06, 2017 7:52 am

The site is off-line.

Isn't there an element with a class that wraps the article that you can use in the selector?

Code: Select all

.itemid-2947 .articlewrap table {
font-size: 10px;
border: 1px solid #f2f5f5;
}

wikivle
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Aug 05, 2017 12:52 pm

Re: How Not To Style Category List Table

Postby wikivle » Sun Aug 06, 2017 4:23 pm

I don't know. I'd be more than happy to try and let you know if you can, kindly, tell me where to put this (I'm using Beez3) and what is .item-2947? Does that apply to me as well? if not, how do I found out what itemid I need?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 23664
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: How Not To Style Category List Table

Postby Per Yngve Berg » Sun Aug 06, 2017 5:02 pm

2947 is the ID of the Menu Item.

For Beez3, put it in layout.css and the element is "article"

Code: Select all

.itemid-2947 article table {
font-size: 10px;
border: 1px solid #f2f5f5;
}


Return to “Templates for Joomla! 3.x”

Who is online

Users browsing this forum: No registered users and 8 guests