Changes between Version 2 and Version 3 of Ticket #50909, comment 14
- Timestamp:
- 08/12/2020 06:38:12 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #50909, comment 14
v2 v3 30 30 CSS, a Cascading StyleSheet, is read by the browser top to bottom. If there are identical selectors in the same or other CSS files, whichever one is at the bottom will take priority. Stylesheets added to a page one after another will be treated as if they were just added on to the end of the first. 31 31 32 For example, if a style sheet has `img { max-width: 100%; height:auto; }` and then the samesheet later has `img { height: 100%; }` (''notice the heights are different''), the browser will render all images with `max-width: 100%` and `height: 100%`.32 For example, if a stylesheet has `img { max-width: 100%; height:auto; }` and then the same stylesheet later has `img { height: 100%; }` (''notice the heights are different''), the browser will render all images with `max-width: 100%` and `height: 100%`. 33 33 34 34 What's happening here is the first `img` selector instance is setting both the `max-width` and `height` styles, but the second instance of `img` is overriding the `height`. The browser will render the max-width style set from the first instance (`max-width: 100%`) while the height is rendered from the second (`height: 100%`).
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)