Menu transitions

Hi, for a few sites before V5 (and bootstrap 5) I’ve always used (for example):

a {transition: all .75s ease;}

in the page header to ease the ‘jump’ from normal to active in text links. Has this changed now, or do I need to place it somewhere else?

Thanks all.

I’d use the css input zone in the code editor, that adds it all the the style sheet.

By the way, using “all” is not always a good idea for a transition, it can be resource hungry eg. If you have shadows. It’s easy though, I use it sometimes :joy:

2 Likes

Cheers Pete, so how could I just target, say the navigation, or links in a run of copy?

I’m not sure what that means?

You can target using classes just like when creating custom classes, say for example you just want to style the links in a card.

.card a

Ah, okay, that’s great thanks.
No need to answer, but this is what I meant:

This word here would be the link in a run of copy.

ie: targeting a word or phrase in the middle of a sentence.

Oh right, in a paragraph. Same thing.

p a

You can add that to the class manager to and style any link within a paragraph.

Perfect!
Those beers are slowly mounting up for when I visit NZ!
Have a good weekend.

2 Likes

I’ve stuck with the
a {transition: all .75s ease;}
code because I couldn’t get separate bits to work (and there aren’t really that many links throughout anyway), but I can’t seem to get the menu to ‘transition’, it just jumps. No biggie, just annoying me. Any thoughts?
Thanks

Probably because the selector for the links in the navigation are a bit more specific. I added the transition here in the inspector and it smoothes it:

Screenshot 2023-01-26 at 22.35.12

2 Likes

Cheers @pumpkin , I shall try and give that a go tomorrow.
Thanks very much.

Hi @Pumpkin, is this what I should be doing?

It doesn’t seem to work for me. Sorry!

Try:

.navbar-nav li a {
transition: all .75s ease;
}
2 Likes

Thanks Jerry

I tried, I failed, I went to stand in the corner with an embarrassed expression.

Perfect, thanks.

1 Like

No need to stand in the naughty corner :innocent:. People like you who take the effort of trying to increase their knowledge deserve all the help and support they need. :pray:

2 Likes

Full points for trying, so many don’t bother and just want others to do it for them. I would help you any day.

3 Likes

And you have both been a great help over the past couple of years, I send my thanks to you both (and everyone else who chips in). Cheers all. :beers:

1 Like