Jump to content
WebWerx

Adding A Vertical Line Between Items In Main Nav

Recommended Posts

WebWerx

I would like to add a succinct vertical divider between menu items here: http://cl.ly/image/123F1A070m3f. But I don't want a line to the left of "Home". Ahhhh...

 

I was able to add the top border using ".navigation_wrap". But am struggling with adding what I need.

 

The website is here: http://goo.gl/YXHZ7

 

Thanks for any and all help!

 

:zoro:

Share this post


Link to post
Share on other sites
WebWerx

Hi @Catrina! It's been a while.

 

I totally get what you are suggesting. When I go in Firebug, I see this: http://cl.ly/image/1r39141R3G1Q . From there I can extrapolate that I need to add the requisite code to individual menu items such as li id="menu-item-6165" . My challenge is how to define that via the DIV....

Share this post


Link to post
Share on other sites
Jenny

 

#page .main_nav ul li {

    border-right: 1px solid #F700E6;
}

 

 
^^^ targets all of the menu items at once so you don't have to do it individually :)

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
WebWerx

Thanks Jenny.... The issue with this is that then the menu item that is last on the right will have a border on its right. Hence my desire to identify individual menu items.

 

(BTW- How are you making out? It's been a while).

 

:phew:

Share this post


Link to post
Share on other sites
catrina

For the very last menu item, you can write CSS for it that makes it so it doesn't have a right border. So for that, you'll need the li class selector for the last item and just add: border-right: 0px;


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
WebWerx

Okay - thank you both (@Catrine & @Jenny). I will muddle my way through this. You are both extremely helpful. Have a pleasant weekend!

 

L

Share this post


Link to post
Share on other sites
Jenny

You're welcome :) If you can't get it, just let us know.

 

And I've been well, thank you! Hope you have been doing well also!


Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
WebWerx

@Jenny & @ Catrina: Okay this is simple enough... Now a small tweak... I don't want the vertical line to be full-height. I want a space between the top and the bottom..... so that each menu item doesn't look like it's in a box.... http://cl.ly/image/212Q1h3G0Z2l or perhaps a light dotted line. Something very sedate. IE "border-right-style:dotted;".

 

This is fun!

 

:zoro:

Share this post


Link to post
Share on other sites
WebWerx
@Catrina: Really? Like this?:

#page .main_nav ul li {     

border-right: 1px solid #F700E6; 
padding-top: 5px;
padding-bottom: 5px;
}

Share this post


Link to post
Share on other sites
catrina

Yes, like that, but instead of adding it to the individual menu item, you can add it to the list CSS (for ul).


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
WebWerx

@Catrina: I am sorry. I don't understand what you mean.

 

Here is what I put:

 

 

#page .main_nav ul li {     
border-right: 1px dotted #b4b4b4; 
}
 
So where do I put my top and bottom padding for these elements?
 
I find CSS for NAV systems so confusing!

Share this post


Link to post
Share on other sites
James B

Hi there, i think Cat means apply the code for the padding to the below which stops at the ul class, so its one higher than the previous css and effects the padding for the entire list, so you'll only have to put it in once :-)

 

#page .main_nav ul


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
WebWerx

Hello @ James B: Unfortunately your suggestions does not have desired effect. It makes the NAV system "higher". I have done some research and I don't think what I want to do with CSS is possible. Rather, I may need to create a dotted line in Photoshop and insert it as an image. 

 

Thoughts / comments?

Share this post


Link to post
Share on other sites
batman

Hi 

Please, you can try with

 

ul.sf-menu li {border-right: 1px solid #F700E6;}

:)


Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
Danny

Just adding a margin-top X and margin-bottom X to your navigation a CSS. For example,

.main-nav a {
margin: 4px 0;
border-right: 1px solid #CCC;
}

Please remember that we are not here to design your site for you, I highly recommend you use Firebug or similar tool to inspect your sites CSS.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
WebWerx

Thanks @Batman (Caped Crusader): This gives me the border I need also. But I don't want the border to be from top to bottom. Only partial.

Share this post


Link to post
Share on other sites
WebWerx

Thanks @ Danny: It doesn't work. I can get the dotted line NP using this:

 

 

#page .main_nav ul li {     
margin: 4px 0;
border-right: 1px dotted #b4b4b4;  
}
 
But the margins do not work. The border still goes from top to bottom. 
 
:startle:

Share this post


Link to post
Share on other sites
batman

Hi again, I see margin with firefox

Captura%2520de%2520pantalla%25202012-12-

Your cache?

;)


Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
Danny

@Webwerx

 

The code you're using wont work, you need to target the a CSS for your menu item, use the code I gave you above as an example, add #page or #site to the beginning and it will probably work.

 

Example - http://d.pr/i/Cpxh


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
WebWerx

Ha -- You are too quick @Batman....  The issue here is that I do not want the dotted line to go from top to bottom......

Share this post


Link to post
Share on other sites
WebWerx

@Danny: I will try what you suggested. THX

Share this post


Link to post
Share on other sites
WebWerx

Hey @ Danny: I used this code:

 

 

#site .main-nav a {
margin: 12px 0;
border-right: 1px dotted #b4b4b4;
}
 
The "margin" just make my NAV higher.

Share this post


Link to post
Share on other sites
batman

Sorry WebWerx

I do not see the dotted line to go from top to bottom

Captura%2520de%2520pantalla%25202012-12-

:geek:


Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I have noticed that my primary sidebar becomes intermittently invisible when browsing through various blog articles on michaelkummer.com/blog.
      See:
      https://www.dropbox.com/s/z646sgoa3mfjl1j/Screenshot 2018-07-12 15.57.46.jpg?dl=0 and https://www.dropbox.com/s/vdledzzgginvwgv/Screenshot 2018-07-12 15.57.57.jpg?dl=0
      Upon refresh, the sidebar appears. I have been using the following CSS code to hide the sidebar on mobile without any issues. 
      @media only screen and (max-width: 993px) {
      /* hide sidebars */
           .plsb {
              display: none !important;
          }
      }
      I tried to add the following CSS to force the sidebar to show on screens that are wider than 994 pixels but to no avail. Any clue what could be causing this issue?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using the LESS/CSS Pagelines extension and tried to add the following code to make use of FontAwesome:
      a.c2a:before {
          content: "\f07a\00a0";
          font-family: "Font Awesome 5 Pro";
          Font-weight: 900;
          font-style: normal;
          font-weight: normal;
          text-decoration: inherit;
          padding-left: 4px;
      }
       
      The issue is that as soon as I have the CSS via the Custom Styling text box, Pagelines (or the extension) strips out the backslashes (\). As a result, I had to abandon the CSS/LESS extension and instead add all my CSS code to a separate .css file.
      Is there a fix or workaround for this?
      Thanks
      Michael
    • glyph.marketing
      By glyph.marketing+
      Hello, I am having a problem similar to that experienced by Michael Kummer here. We have pages that show this automatic scrolling issue (examples here and here) and it is sufficiently annoying that we have seen customers bounce while trying to convert. Strangely, it only happens at specific resolutions, so it can be difficult to reproduce. In general we can only consistently reproduce it on a 4k resolution with a browser width between 1517 and 1536px. 
      Thanks to Michael Kummer's help we were able to set the overflow-anchor property to none in the entire body, which fixed the issue as far as we can tell, but also obviously disabled scroll anchoring for the whole site. I tried applying it to the specific element that looked like it was being reloaded, which was the PL Meganav extension, but that was unsuccessful. 
      Can anyone help us figure out which element or ID we can apply this property to, so that we can fix the scrolling issue but not disable scroll anchoring for the entire site?
      Thank you - 
      Glyph Language Services
    • Liv Kundalini
      By Liv Kundalini+
      Hi -
      Pulling my hair out over here, and would love an assist!
      Site I am building, http://www.livkundalini.com/home, has a problem with the submenu items in the nav not appearing. 
      If anyone wants to see what the Nav should look like, feel free to look in the footer on the left hand side.
      Have tried disabling Pagelines and using the twentyseventeen theme, but problem persists.
      Saw this error (pasted at the bottom of this post) displaying in the inspector, and saw discussion of Jetpack potentially being a culprit. Disabled Jetpack, but the problem persists.
      Had the hosting company even flush the server-side cache, but no avail.
      Any thoughts? Please? It's the only thing keeping me from launching this site!
      Many Thanks,
      Todd
       
      WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403   O @ (index):7
×