Simple input[name=Sex][value=M]
would do pretty nice. And it’s actually well-described in the standard doc:
Multiple attribute selectors can be used to refer to several attributes of an element, or even several times to the same attribute.
Here, the selector matches all SPAN elements whose “hello” attribute has exactly the value “Cleveland” and whose “goodbye” attribute has exactly the value “Columbus”:
span[hello="Cleveland"][goodbye="Columbus"] { color: blue; }
As a side note, using quotation marks around an attribute value is required only if this value is not a valid identifier.
Related Posts:
- Is there a CSS parent selector?
- Nesting CSS classes
- What is the difference between the selectors “.class.class” and “.class .class”?
- In CSS what is the difference between “.” and “#” when declaring a set of styles? [duplicate]
- What does “*” mean in CSS?
- What does an asterisk (*) do in a CSS selector?
- Is there an opposite CSS pseudo-class to :hover?
- Define an ‘s src attribute in CSS [duplicate]
- Combine :after with :hover
- What does the “~” (tilde/squiggle/twiddle) CSS selector mean?
- Is there a “previous sibling” selector?
- How can I apply styles to multiple classes at once?
- CSS “and” and “or”
- CSS selector for first element with class
- How to select label for=”XYZ” in CSS?
- How to get these two divs side-by-side?
- How to change the color of an svg element?
- How to implement max-font-size?
- @Media min-width & max-width
- How do I center this form in css?
- How can I replace text with CSS?
- Float a div above page content
- height style property doesn’t work in div elements
- background-size: cover not working?
- combined multiple classes into one css rule
- CSS Outside Border
- Is there an opposite to display:none?
- Rainbow gradient on text in CSS
- CSS3 opacity gradient?
- use multiple css filters at the same time?
- Removing whitespace between HTML elements when using line breaks
- Why are my divs overlapping?
- Cache busting CSS files other than style.css
- How do I add a search bar to my header?
- Sanitize User Entered CSS
- Stylesheet switching and caching
- Check and dequeue if multiple stylesheets exists using wp_style_is?
- plugin css is not being applied to the page?
- How do I make Div Container 100% width only on homepage of site?
- WordPress & W3C CSS Validation
- TwentyTwelve versioning
- Duplicate attribute class causing site validation error
- Assets in css dont link properly in pages other than home
- How do I style WordPress pages differently based on the tag used?
- How/where to add additional stylesheet to WP
- How the Css File is Linked without calling it in header.php?
- Show enqueued CSS and Script in custom header
- How to insert html/css/javascript code to wordpress plugin
- Importing changes to Child Theme
- Save changes in CSS after removing Menu from specific page
- Move the position of menu item [closed]
- Title has word broken when viewed in mobile [closed]
- Advanced: understanding wp_add_inline_style function
- WordPress code editor messed up my code!
- Ordering stylesheet above using functions.php
- How to change “““ to “““?
- How to remove parent style.css from the header
- Placing background image over section divider
- enqueing Javascript and CSS
- Acessing HTML element with no specific tag on it [closed]
- Earlier stylesheet not overriding later one
- Order of WP page load (including widgets, php, plugins, media, templates, and CSS) [duplicate]
- CSS is not loaded on mobile devices
- Fixed height of the_content()
- How can I add inline CSS for each image?
- Creating a second menu on Twenty Eleven aligned right from the first
- Help with a little CSS logo/header modification?
- I have html form and need to make it work in text editor on template. Only problem is it has .sccs styling file
- underscores theme – sass folder structure vs smacss
- Inclution place of CSS file
- Unused CSS in WordPress Plugins
- I have text on a banner on my wordpress site and I am unable to get rid of it? Would appreciate any help or advice :-)
- Img load while refreshing
- Twenty Fourteen: Unsticky header after making header bigger
- How to display javascript banner in website header?
- Loading css files conditionally useful?
- Is there any way to turn off a particular scrolling behaviour?
- Sidebar at bottom however I have completely replaced theme folder back to original code
- Site not 100% responsive
- Dropdown menu’s fighting with each other [closed]
- Customizer: CSS changes not persistent
- Move both sidebars more to their sides [closed]
- Scale An Image Thumbnail
- Which hook to use to add notification message at beginning of my
- single.php doesn’t getting style
- Converting Static HTML pages to WordPress
- How to make widgetized footer styles be inherited from body?
- custom css in admin panel by user id
- How to customize a theme’s navigation menu with css
- Site layout problems when logged in due to admin bar
- Add “sub-nav” class to a sub menu parent item
- Current Post/Page Ancestor, CSS
- How to change the CSS in one file?
- Custom css code in wordpress [closed]
- Using Easy Google Fonts correctly and Droid Sans on Max OS X [closed]
- remove white overlay [closed]
- ACF Extended : Disable styles in front [closed]
- How to avoid problems caused by new block-library default CSS rules (wp 6.1.1)
- Grid problem on privew mode
- Disabling double vertical scrollbar and horizontal scrolling?