Answer the question
In order to leave comments, you need to log in
Why doesn't the font size change?
Hello, I'm using SCSS to style the page. I have an h2 tag with an id title that has an initially defined size. I want to change the font size of the h2 tag with a maximum screen width of 320px, but this does not happen. I tried to change the font color, and everything works, but not with the size. Below code
form {
display: flex;
flex-direction: column;
#title {
font-size: $fontSize;
font-weight: $fontWeight;
}
.button-div {
display: flex;
flex-direction: column;
margin-top: 10px;
button {
position: relative;
left: 50%;
transform: translateX(-50%);
width: $buttonWidth;
height: $buttonHeight;
margin-top: 20px;
outline: none;
border: none;
border-radius: 5px;
color: white;
font-size: $buttonFontSize;
}
#facebook-btn {
background-color: #064ebb;
}
#google-btn {
background-color: #6d1ea6;
}
#facebook-btn:hover {
background-color: #0644a1;
cursor: $buttonCursor;
}
#google-btn:hover {
background-color: #53177e;
cursor: $buttonCursor;
}
}
#email-link {
text-decoration: none;
margin-top: 30px;
span {
padding-left: 10px;
}
}
#email-link:hover {
text-decoration: underline;
}
}
/*iphone 5 breakpoint*/
$iphone-breakpoint: 320px;
/*media queries*/
@media (max-width: $iphone-breakpoint) {
form {
#title {
color: green;
font-size: 18px;
}
}
}
Answer the question
In order to leave comments, you need to log in
Everything works if you remove the extra parenthesis before/*iphone 5 breakpoint*/
It is bad practice to use identifiers for type elements, try changing to a class
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question