Use the :nth-child()
pseudo-class:
li:nth-child(odd){
background-color: white;
}
li:nth-child(even){
background-color: green;
}
Related Posts:
- Customizing a WordPress theme without changing it?
- how to add version of style.css in wordpress
- How can I version the main CSS file?
- Switching themes without losing widgets?
- can require “themefolder/includes/widgets.php” in “themefolder/functions.php” yet widgets.php doesn’t run
- How to set two different themes on one WordPress? (Desktop vs. Mobile)
- Moving WordPress.com theme and widget settings to self-hosted site?
- Why are my widgets not saving when being added to a sidebar?
- I’m trying to add an image in my CSS
- How to use scss in wordpress theme?
- How to automatically highlight syntax of code in a post?
- How to add the main style.css to my index.php?
- Duplicate and change a Theme Widget
- The style.css stylesheet doesn’t contain a valid theme header
- Current theme broken – after server and domain migration
- Getting rid of unused css directives [closed]
- Exclude stylesheet from admin
- hfeed CSS class in Twentyeleven Theme
- Change Theme from Plugin based on query_vars
- Change logo on each page of University Hub theme [closed]
- How do I copy my Parent Templates to my Child Templates?
- Theme information in style.css being corrupted
- How do you create a custom WPTouch theme?
- How to start learning CSS and theme development?
- How do I apply my CSS to a theme page?
- how to remove padding from left and right side? [closed]
- 404 Error while accessing the font files
- Changing $before_widget for certain widgets
- How to load parent theme style.css?
- adding multiple sidebars on pages
- Child Style.css not overriding parent theme style located in assets/css/main.css
- Embedded Videos (PB) – Not Available
- Hide default “Recent Comments” Widget if there are no comments yet
- Widgets menu does not appear under “Appearance” in dashboard
- How does a Child Theme works?
- Calling widget via function in themes files (hard code)
- Creating new templates in child themes breaks layout
- Inject widgets from one sidebar into another with PHP
- none of my css is working in my child theme
- How to conditionally display widgetized areas in theme customizer?
- X-Axis of Site is Messed Up Because it is in Hebrew
- Add more widget areas to a theme
- Displaying a widget in sidebar only when no other widgets rendered?
- Whitespace between logo and site title in Twenty Twenty-Two
- CSS appears to not work on any WordPress theme
- Broken theme, stylesheet is missing after uploading the right theme via FTP
- removing side space between para and container on generatepress?
- Removing a widget via theme editor
- How can I modify the CSS only for the search results page of WordPress?
- sidebar in 2020 theme as a widget
- Remove the breadcrums on a theme W
- Enqueue All Stylesheets Found In a Theme Folder
- WordPress margin issues
- How Can I Disable WordPress Theme Self-Update?
- Remove style id inline CSS in WordPress
- Theme CSS missing completely
- WordPress 404 on style.css but not on all pages
- How to customize a section of a widget only on certain pages or page
- how make wp include urls as https?
- Own Theme custom CSS does not display in editor but works in page
- style.css of my custom theme is not being applied at all
- Custom CSS is overwritten by WordPress?
- CSS in child theme isn’t working properly
- WordPress loads old style.css, then loads current one
- Changing theme folder name disrupts widgets
- Strange Theme Error – parent style occasionally showing though child theme
- How to get dynamic template-function generated CSS into HEAD?
- TwentyFourteen Theme : Changing grid layout
- Using two stylesheets for mobile compatibility
- Phone numbers showing same color as header [closed]
- Featured images are cropped on index and post page
- EM in CSS different size on wordpress then elsewhere [closed]
- Orion theme (from theme forest) [closed]
- How do I block a subdirectory from WordPress theming?
- div having different appearances in different themes
- Customising a theme
- Blog shows up without Theme/CSS styles
- No “available widgets” (wordpress 3.2.1 multisite)
- Child theme after CSS modification
- How to Hide Blog Post Author?
- How can i limit wordpress post title characters in sidebar?
- I can’t install theme: theme install failed
- How can I either move the nav bar down or create more space for the header? Theme – Ajaira
- Commenting in CSS (//) equals “none”? [closed]
- theme 2016 – customize css – nothing happens
- Help with responsive theme styling issue
- How to change the standard width of a page
- Theme install failed
- How can i remove footer credit text
- How to make a page extend full screen [closed]
- Help with Divi logo not appearing for 10s
- Custom Theme Additonal CSS “” are transformed to “>” and “<”
- How to remove pop up on website (css changes not visible)?
- css on body tag in editor
- How can I add a new Styles option in WordPress 2024 theme?
- How do I remove the hamburger menu from the Twenty Twenty Four theme?
- I added a rating system on my blog post but instead of stars it shows boxes
- Is there a way to enable horizontal margin for a specific block element?
- Apply Style variation to specific pages
- How to cancel style.min.css file?