Navbar Appearance 2.
2 posters
Page 1 of 1
Navbar Appearance 2.
Forum Link: http://genocideclan.forumotion.com/
Forum Style: phpbb3
Yeah, I got some Navlinks to hide using this coding
But when i tried to hid the original Register Page, it hid both register pages, the original (/register) and my custom html page (/h2-register).
Anyone know how to simply hide the "/register" navlink?
Forum Style: phpbb3
Yeah, I got some Navlinks to hide using this coding
- Code:
a[href*="calendar"] {
display: none !important;
}
a[href*="faq"] {
display: none !important;
}
But when i tried to hid the original Register Page, it hid both register pages, the original (/register) and my custom html page (/h2-register).
Anyone know how to simply hide the "/register" navlink?
Last edited by Ace 1 on May 15th 2015, 6:34 pm; edited 1 time in total
Re: Navbar Appearance 2.
Hi @Ace 1,
The problem is that you're using the wild card in the attribute selector. ( see bold red )
a[href*="register"]
This selects any anchor element that contains any occurrence of the value register. Simply remove the wild card, and place the whole pathname as the value. Example :
Note however, that the value must be exactly the same as the HREF attribute. See the following page for more information :
http://www.w3schools.com/css/css_attribute_selectors.asp
The problem is that you're using the wild card in the attribute selector. ( see bold red )
a[href*="register"]
This selects any anchor element that contains any occurrence of the value register. Simply remove the wild card, and place the whole pathname as the value. Example :
- Code:
a[href="/register"] {
display: none !important;
}
Note however, that the value must be exactly the same as the HREF attribute. See the following page for more information :
http://www.w3schools.com/css/css_attribute_selectors.asp
Re: Navbar Appearance 2.
That worked, thanks. But when I do that, there are gaps where the navlink used to be.
Should I use the following code?
Should I use the following code?
- Code:
a[href="/calendar"] {
display: none !important;
padding: -1px;
}
Re: Navbar Appearance 2.
Unfortunately negative padding isn't possible in CSS, however, you can use negative margins. The problem itself, doesn't come from the link, but rather the parent element; <LI>. It has about 8px of empty space, so this can be removed with the following rule.
It'll make your navlinks appear a bit close, so you can add some margin to them with the following rule, if you want.
- Code:
ul.linklist li { margin:0 -4px }
It'll make your navlinks appear a bit close, so you can add some margin to them with the following rule, if you want.
- Code:
#page-header a.mainmenu { margin:0 8px }
Re: Navbar Appearance 2.
Just for appearance, I like the navlinks being equidistant from one another, which is satisfied by your first code. The second code (even when used with the first one) just spreads the links out more, but the space is still visible where there used to be a navlink. So the second doesn't satisfy the symmetrical aspect of my DreamForum.
-----------------------------------------------------------------------------------------------------------------
Update: Turns out, I could just go to AP > Display > Homepage > Headers and Navigation and move the hidden navlinks to either the top or bottom of the list and it doesn't show a space anymore because the navlink space (" ") is on the side of the navbar Xd
Topic Solved
-----------------------------------------------------------------------------------------------------------------
Update: Turns out, I could just go to AP > Display > Homepage > Headers and Navigation and move the hidden navlinks to either the top or bottom of the list and it doesn't show a space anymore because the navlink space (" ") is on the side of the navbar Xd
Topic Solved
Re: Navbar Appearance 2.
You could also do that too, thanks for providing the solution.
Topic archived
Topic archived
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum