Simple grammatical fixes (#23499)

This commit is contained in:
GrantiVersace
2018-10-30 12:47:53 -05:00
committed by Aditya
parent a4fe23e912
commit 5c21d6a83a

View File

@ -5,7 +5,7 @@ title: ID Selector
The CSS ID selector applies styles to a specific html element. The CSS ID selector must match the ID attribute of an HTML element. The CSS ID selector applies styles to a specific html element. The CSS ID selector must match the ID attribute of an HTML element.
Unlike classes, which can be applied to multiple elements throughout a site, a specific ID may only be applied to one single element on a site. Unlike classes, which can be applied to multiple elements throughout a site, a specific ID may only be applied to one single element on a site.
CSS ID will override CSS Class properties. CSS ID will override CSS Class properties.
To select an element with a specific id, write a hash (#) character, followed by the id of the element. To select an element with a specific ID, write a hash (#) character, followed by the ID of the element.
### Syntax ### Syntax
```css ```css
@ -19,7 +19,7 @@ div.classname#specified_id { color: green; }
``` ```
### Note about IDs ### Note about IDs
ID should be avoided when styling if possible. As it has high specificity and it can be overriden only if you inline styles, or add styles into ```<style>```. The weight of ID override class selectors and type selectors. ID should be avoided when styling if possible. As it has high specificity and it can be overriden only if you inline styles, or add styles into ```<style>```. The weight of ID overrides class selectors and type selectors.
Remember, the ID selector must match an HTML element's ID attribute. Remember, the ID selector must match an HTML element's ID attribute.
```html ```html