harleyquinn Posted November 17, 2020 Share Posted November 17, 2020 Hi everyone I've been trying to solve the following case for hours: Let's take this as an example: <h2> Hello World <span style = "font-family: 'Courier New', Courier;"> this is a </span> test </h2> I have currently implemented the following via CSS: @media only screen and (max-width: 768px) { h1 { font-size: 36px; line-height: 43px; } h2 { font-size: 29px; line-height: 35px; } } What I want: That in this example the font "Courier New" can be addressed separately and adjusted via CSS. I want to change this globally, not inline. Does anyone have a clue here? I am slowly desperate. Link to comment Share on other sites More sharing options...
dsonesuk Posted November 18, 2020 Share Posted November 18, 2020 Give the element a class name, with same styling, adjust the styling to that class name in media queries depending on device size. Link to comment Share on other sites More sharing options...
Sherin Posted December 1, 2020 Share Posted December 1, 2020 You can give id or class name of span tag and styling their class name or id Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now