css3 - How do I remove the border of all - elements on the last row? -


I have seen lots of explanations of how to choose the last element in a list and how to remove its limit as well as with CSS3 How to choose the last one from the other but it is not enough for my case.

I have a horizontal navigation that floats for two columns for a mid-sized viewport, with a variable number of elements. There are four elements, but if the user is an administrator, then there is a fifth element in navigation. Therefore, the last column looks like a "" two-column table, either ; Li & gt; Whether it is or not

This is what looks, currently (no border is deleted):

 Enter the image description here I want this, when there are five elements, I can remove the lower limit of the" help "item. And when there are four elements ("administration" is unavailable), the limit below both help and administration has been removed.

I tried to give "help" to my class, with the idea that in the worst case, I used JavaScript to specify the class in the last or two final elements, depending on the number of elements. Can i But in some way the boundary did not come out.

By the way, I can not go to the top and left borders, because in the case of odd-numbered, there is no limit in the last "cell".

The code block below is also available.

  & lt; Div class = "horizontal-nav clearfix" & gt; & Lt; Div class = "centres-horizontal-nav" & gt; & Lt; Nav class = "horizontal-nav cleanfix" & gt; & Lt; Ul square = "horizontal-nav" & gt; & Lt; Li & gt; & Lt; A & gt; Find models & lt; / A & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; A & gt; Manage models & lt; / A & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; A & gt; Manage Account & lt; / A & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; A & gt; Administration & lt; / A & gt; & Lt; / li & gt; & Lt; Li class = "new-no-border-bottom" & gt; & Lt; A & gt; Help & lt; / A & gt; & Lt; / li & gt; & Lt; / Ul & gt; & Lt; A href = "#" id = "pull" & gt; Menu & lt; / A & gt; & Lt; / Neo & gt; & Lt; / Div & gt; & Lt ;! - Focused horizontal NAV - & gt; .centering-horizontal-nav {height: auto; Width: 100%; Display area; } Nav.horizontal-nav {height: auto; } Nav.horizontal-nav ul {width: 100%; Display area; Height: auto; } Nav.horizontal-nav li {width: 50%; Swim left; Status: Relative; Display: Block-inline; Border Bottom: 1 Px Solid # BFD1Ad; Border-right: 1 px solid # bfd1 ed; Margin-left: -1px; Line-height: 37px; } Nav.horizontal-nav li a {} nav.horizontal-nav a {text-align: left; Width: 100%; Padding-left: 5%; } Nav a # pull {display: none; } Div.horizontal-nav {margin-top: 4px; Margin-down: 4px; Border: 1 px solid # bfded; } Li.nav-no-border-bottom {border-bottom: none; } .clearfix: first, .clarfix: after {content: ""; Display: Table; } .clarfix: after {clear: both; } .clearfix {* zoom: 1; } Nav.horizontal-nav (font-weight: 400; hidden drag); nav.horizontal-nav a {color: #ffffff;} nav.horizontal-nav li: hover, a: active {/ * background-color: # 5987d1 * / / * Text-decoration: Underline; * Left-nav {float: left; Background Color: RGBA (0,128,0,0,5); / * Size Parameter (Media will overwrite questions) * / Width: 100%;} Div.horizontal-nav {/ * Position: relative; background color: # 2662c3; width: 100%; * / / * range: solid red 2px; * / hidden palate; background color: # 2662c3;} ul {list-style-type: none;}    

I do not think that in the CSS" bottom line of elements like this ", however, you can obscure the bottom border, even with the negative margin on the container:

 . Centering-horizontal-nav {margin-bottom: -1px;}   



Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -