Hi all, I use RW 8 to build my website, maddalenapoli.com
I use Mountain theme with CSS additions to modify single pages. I have used the same CSS for all pages with regard to font (type and size), but only some are responsive
this works otherwise fine in other pages; in some, it affects only some of the text (e.g., in “Publication” page). The font in the menu is also responding only at times. I do not fully understand why that is.
You’re using a CSS universal selector (*), which matches elements of any type.
CSS Specificity comes to play here
If there are two or more conflicting CSS rules that point to the same element, the browser follows some rules to determine which one is most specific and therefore wins out.
Think of specificity as a score/rank that determines which style declarations are ultimately applied to an element.
The universal selector (*) has low specificity, while ID selectors are highly specific!
So what’s happening is some elements on the page have CSS rules that have a higher ”Specificity Score,” which applies a different font-family property.
ok I have another question. After having looked at the specificity, I tried to identify the name of the div for the menu. It appears to be .navbar-nav mr-auto, is that correct? I am talking of the menu top left of all main pages, i.e. home page Maddalena Poli, Work, Play/ It does not respond to that division name nor any other ways. What am I doing wrong?
I want all font to be Helvetica Neue. For all the pages that are within the three main ones, the generic * worked fine.
It does not work for the pages Maddalena Poli, Work, and Play. This is how my website is organized:
so given the point about specificity, I went to find the ID of the menu bar that appears on top let (the menu bar at the end of the pages is in Helvetica, see homepage at maddalenapoli.com )
I thought that I identified the division for it, but you are telling me it is not the right one, is that correct?
This is how the CSS looks like now for my homepage