Lengthening navigation bar
-
Hello,
I’ve been playing around in CSS to lengthen the navigation bar of my portfolio
posts, but noticed that whatever I tried would also lenghten the navigation bar
of my blog posts.Is there a specific code that I could use that would only
lengthen the navigation bar for the portfolio without affecting that of blog
posts, and for desktop view only?Many thanks in advance!
The blog I need help with is: (visible only to logged in users)
-
Hi @liberaequa,
Layout and functionality changes can get pretty complex with various media queries and what not, so they fall outside the scope of the CSS support we offer here.
That said, if you’re willing to dig into the nitty gritty to find this, and it sounds like you are: try using Inspect Element to find portfolio-related classes in the body. Here’s how:
https://wordpress.com/support/custom-design/how-to-find-your-themes-css/Then look at the body tag. You can also view source for the page and read the body tag that way.
Depending on what page you’re trying to change, you’ll likely find a body class, like ‘jetpack-portfolio-template-default’ for example. To make your CSS only apply on that class of page, add that to your selector.
So for example, if you were using this (which I realize is nonsensical but I assume you already have the code you want, and just want it more specific):
.navigation { width: whatever; }you might use this instead, taking the class from the body and adding a dot before it per CSS specs:
.jetpack-portfolio-template-default .navigation { width: whatever; }I hope that helps! There are a ton of great resources on the web on using CSS selectors, too, so if that isn’t quite it, keep at it!
-
Hi @supernovia,
Sounds like this is the most complicated CSS idea I’ve ever had!
Will keep what you’ve suggested in mind and see what I can do. :)Thank you!
- The topic ‘Lengthening navigation bar’ is closed to new replies.