Well, I think you could use the CSS begins with selector to select all div’s that begin with category-
div[class*='category-'] #main { width: 300px!important; }
so as you add them, it will still affect any class that begins with them. Then, assuming you have 1 or 2 categories you don’t want to have the property, you could simply override them AFTER the rule above.
div.category-44 #main { /*do something else*/ }
Related Posts:
- How to create an automatic MultiColoumn MegaMenu with Categories WordPress
- Create a full width responsive header image per page
- Remove “Category Archives: title” at the top of a category page [duplicate]
- Hide post meta data on a specific category
- Different excerpt styles per category, but chronological
- Highlight wp_nav_menu when category is selected
- Category location styling
- Hide woocommerce category name from specific pages
- Hide woocommerce category name from specific pages
- Style category link depending on category ID
- Inside a loop, how to change CSS class based on category name?
- Why do I have stray bullet from
- How to add custom color fields to the category edit page?
- Different CSS class by category
- Simple way to style posts of a single category differently in the loop and in single
- Remove Archive | from Categories
- Custom css per category and per single post belong in each category
- Restrict CSS on one page
- Show Secondary Sidebar on Category pages (archive)
- How to get sub-categories to display same look as there parents
- category description not showing in my woocommerce
- Inline If statement to echo CSS [closed]
- How to “remove” WordPress categories UL and make the list loop in a horizontal line?
- Custom Woocommerce Category view
- Broken category styling
- How can i hide the authors box from a specific set of categories and post types?
- How to prevent page re-sizing for mobile browsers [closed]
- How to hide my categories pages’ names, and how as well to reduce the space beween my sidebar’s widgets?
- Is There a Difference Between Taxonomies and Categories?
- Get rid of WordPress category, tag and author archives?
- Filtering categories in the permalink structure
- get_categories hierarchical order like wp_list_categories – with name, slug & link to edit cat
- wp_nav_menu not appearing for a couple pages
- Why aren’t sub-categories nested after creating post in the WP Admin?
- Preventing index.php?category_name=something from redirecting
- How to get category id of current post?
- Programmatically create product category and add thumbnail in woocommerce
- Trash bin for categories
- Categories’ hierarchy in URL
- Display one category in one page
- How to get next previous category in same taxonomy?
- Show Subcategory Description
- Check is category parent or not from its ID
- Which php file lists all the post of a category
- How to query posts from specific authors and categories using WP_query?
- Apply custom category template to subcategories
- Retrieve all posts within tag OR category?
- How to customize tag and category post listings to show introductory content?
- List Terms in Category
- Can you have a single set of “canonical” categories shared by all blogs?
- List Posts by Category for a Non-Zero, Non-NULL Custom Field Value?
- Rename Default Category (Uncategorized) Via a Function
- How to customize category template?
- Customized landingpages for categories
- get_the_category_list open in parent window
- Show category images on single product page and product overview page
- Class active for Archive link – looped out
- Get parrent category name
- Display specific categories by ID
- Sorting category products not working
- Show category from “Next post” and “Previous post” [edited]
- Remove sub-menu item from admin menu
- How to add WordPress sub category without select
- How to customize categories panel?
- ACF add custom fields to categories and display
- Custom taxonomy template for categories
- Show category with link
- Select posts from Category
- Display a list of subcategories a post belongs to
- Display unused categories in dropdown
- Get post related on category
- Give Children Unique ID’s
- Some of the category description not showing up in category page
- Need to echo category id in multi-dimensional array
- Use blog as base for tags and categories
- Load stylesheet in edit category page?
- Can’t iterate through 2 levels of categories
- Category URL Management
- Update custom category fields front-end
- Add Post Categories in Post Tags Field Programmatically
- List all categories and count number of posts within based on custom date
- Filter custom taxonomy posts via AJAX
- set a parent category in a product woocommerce
- A search box for all sites – Multisite
- How to grab posts from the most recently created category
- Match two taxonomies to display a specific content
- Function to list posts from current post’s category fails in WP 3.8
- Multiple parent categories
- Custom fields setup when category selected filter subcategories
- Make three menus with three category levels
- Getting categories to change appropriately when using $cat = ‘ ‘;
- how to call the category of the post
- Category related -> excerpt, title and thumb in sidebar on article page
- How to have a category not show up in query post with page panigation?
- why is the delete option missing from just one category?
- Get all categories
- Show category post order ASC
- How to display all category images for single post in a page?
- Custom EndPoint not working when strip child category in URL
- How to add custom prefix before category base for category page URL?