Doing that, should I expect to see a difference when viewing the code?
Would something be noticeable?
Would there be a visual difference?
/*.inner-container {
display: none;
} */
Doing that, should I expect to see a difference when viewing the code?
Would something be noticeable?
Would there be a visual difference?
/*.inner-container {
display: none;
} */
Yes the element would sit in between the blue and red buttons and although it may not notice it will still be there and may interfere if you have more buttons.
What did I do wrong?
.container.active {
flex: 1 0 0;
animation: fadebody 5s ease 0s forwards;
background-size: 165px 165px;
background-image: linear-gradient(teal 5px, #0000 5px),
}
.playb.container.active {
background-size: 165px 165px;
background-image: linear-gradient(red 5px, #0000 5px),
linear-gradient(90deg, red 5px, #0000 5px),
}
Did you add the playb class in the HTML?
No need to duplicate anything except the background image property.
Is the css in the right order in the style sheet ?
Like this:?
.container.active {
flex: 1 0 0;
animation: fadebody 5s ease 0s forwards;
background-size: 165px 165px;
background-image: linear-gradient(teal 5px, #0000 5px),
linear-gradient(90deg, teal 5px, #0000 5px),
linear-gradient(black 10px, #0000 10px 160px, black 160px),
linear-gradient(90deg, black 10px, #0000 10px 160px, black 160px),
linear-gradient(orange 15px, #0000 15px 155px, orange 155px),
linear-gradient(90deg, orange 15px, #0000 15px 155px, orange 155px),
}
.playb.container.active::before {
background-image: linear-gradient(red 5px, #0000 5px),
linear-gradient(90deg, red 5px, #0000 5px),
linear-gradient(black 10px, #0000 10px 160px, black 160px),
linear-gradient(90deg, black 10px, #0000 10px 160px, black 160px),
linear-gradient(orange 15px, #0000 15px 155px, orange 155px),
linear-gradient(90deg, orange 15px, #0000 15px 155px, orange 155px),
}
Where did the :before appear from ?
I added it in because, I thought it would be which turns out to be the wrong thing to do.
Hereâs a jsfiddle I can work on.
https://jsfiddle.net/85pohrqm/1/
What am I doing wrong?
https://jsfiddle.net/ozge1pn8/1/
.container.active {
flex: 1 0 0;
animation: fadebody 5s ease 0s forwards;
background-size: 165px 165px;
background-image: linear-gradient(teal 5px, #0000 5px),
linear-gradient(90deg, teal 5px, #0000 5px),
linear-gradient(black 10px, #0000 10px 160px, black 160px),
linear-gradient(90deg, black 10px, #0000 10px 160px, black 160px),
}
.playb .container.active {
background-size: 165px 165px;
background-image: linear-gradient(red 5px, #0000 5px),
linear-gradient(90deg, red 5px, #0000 5px),
linear-gradient(black 10px, #0000 10px 160px, black 160px),
linear-gradient(90deg, black 10px, #0000 10px 160px, black 160px),
}
Is the space between .playb
and .container
meant to be there?
(Iâve no idea what the issue is that youâre trying to address, so I canât be more helpful than that.)
Using 2 backgrounds, one for each video.
I tried this also.
.playb.container.active
Just to be sure (as the fiddle doesnât show on my mobile ) where are you adding the new class?
It should be on the same element as .container.
<div class=âcontainer newclassâ>
You might be able to see this:
Still confused.
Iâm still doing it wrong.
You can make edits to it.
https://jsitor.com/CDPgzU8s8
backup copy.
https://jsfiddle.net/ozge1pn8/1/
You donât seem to be doing anything that I told you still?
You havenât added a new class to the container and you havenât used the new class to show the image all as previously shown!
.newclass.container.active{}
<div class=âcontainer newclassâ>
Like this?
This way doesnât work.
playa.container.active {
flex: 1 0 0;
animation: fadebody 5s ease 0s forwards;
background-size: 165px 165px;
background-image: linear-gradient(teal 5px, #0000 5px),
linear-gradient(90deg, teal 5px, #0000 5px),
.container. .playb {
background-image: linear-gradient(red 5px, #0000 5px),
linear-gradient(90deg, red 5px, #0000 5px),
}
You are confusing the instruction for the HTML with the instruction for the CSS.
Look carefully at where and how Paul told you to add the new class for each.
This works, but how is the duplicate removed?
https://jsitor.com/CDPgzU8s8
html
<div class="container .playb with-curtain">
.container.active {
flex: 1 0 0;
animation: fadebody 5s ease 0s forwards;
background-size: 165px 165px;
background-image: linear-gradient(teal 5px, #0000 5px),
}
.container.active {
background-image: linear-gradient(red 5px, #0000 5px),
linear-gradient(90deg, red 5px, #0000 5px),
Really? Thatâs showing the same background image for both the blue and red buttons, and you said you didnât want that.
In CSS, if you have two rules for the same thing (in this case .container.active
) then whichever comes later in the CSS will be applied (in this case the red background).
If you want both to display the same background image, simply replace the background-image
code in the first rule with that from the second rule, and remove the second rule.
If you want them to be different, then look again at Paulâs instructions.
Red button gives me teal
Blue button gives me red
I swear it was just working before.
I donât know what happened.
Thatâs strange, because both buttons give me red, which is what Iâd expect from that code.
I donât know what happened, now Iâm seeing red for both.
I donât know what the right combination should be.