- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
In div i got h1,so my question is if i can rule out h1 from div declarations by using not selector?
:not(h1) {
(something like this);
}
@media(min-width: 600px)
{
div *{
font-size:2.8vw;
}
aside{
display:block;
}
}
It depends on what it is you are trying to do.
This…
:not(h1) {
(something like this);
}
…doesn’t target h1
at all. it targets everything except h1
tags.
I would suggest you’d want div :not(h1)
to target everything inside the div, except for the h1, but the code you posted isn’t making your requirements very clear.
To help us along, try making a simple CodePen demo to show us what you’re trying to do and what you’re having problems with.
Im mean, h1 that is in Div selector scales to font size too what makes it really small,so im just asking is there anyway to rule out h1 form there.
div *{
font-size:2.8vw;
}
I know i can make this by taking * from div but that woudl be a lot of work.
If what im saying is not clear i can post the code.
https://imgur.com/a/zWgk9rF Before 600px
https://imgur.com/a/CZnsMFp After 600px
Maybe this will help in understanding what i mean
I think our answers have already given you all the information you need to move forward;
Div * :not(h1)
{
font-size:2.8vw;
}
Thats the anwser,thanks for help