Bitcoin Forum
November 17, 2024, 01:35:34 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 0.2 BTC Reward -- CSS based Vertical Expanding Nav Menu  (Read 1311 times)
Envrin (OP)
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
September 07, 2014, 04:02:07 AM
 #1

If anyone can resolve this, post your BTC address as well, and I'll send you 0.2 BTC.  First come, first served.

Need a CSS based vertical expanding nav menu. No Javascript allowed. I have a CSS tab control working just fine, and mostly have the nav menu working, but am stuck. I can get the nav menu to expand upon clicking a parent menu, but when clicking on a sub-menu it instantly collapses the parent menu without redirecting the user to the new page.

Any help greatly appreciated! If it helps, here's some dumbed down CSS / HTML code:

Code:
.cnav {
    position: relative;
    display: block;
}

.cnav ul {
    list-style-type: none;
}

.cnav ul > li {
    display: block;
    float: left;
    width: 100%;
    margin: 0;
    padding: 0;
}

.cnav ul li > a {
    font-size:14px;
    height:38px;
    width:100%;
    line-height:38px;
    border-bottom: 1px solid #c4c4c4;
    border-top: 1px solid white;
    color: #3f3f3f;
}

.cnav ul li > .sub {
    display: none;
    background: rgb(255,255,255);
    margin-top:0px;
    width:100%;
}

.cnav ul li a:focus + ul.sub { display: block; position: absolute; left: 0px; }
Code:
<div class="cnav">
     <ul>
          <li><a href="#">Home</a>
                 <ul class="sub">
                     <li><a href="/about">About Us</a></li>
                     <li><a href="/page1">Some Page</a></li>
                     <li><a href="/page2">Another Page</a></li>
                 </ul>
          </li>
          <li><a href="#">Products</a>
                 <ul class="sub">
                     <li><a href="/about">About Us</a></li>
                     <li><a href="/page1">Some Page</a></li>
                     <li><a href="/page2">Another Page</a></li>
                 </ul>
          </li>
          <li><a href="#">Support</a>
                 <ul class="sub">
                     <li><a href="/about">About Us</a></li>
                     <li><a href="/page1">Some Page</a></li>
                     <li><a href="/page2">Another Page</a></li>
                 </ul>
          </li>
     </ul>
</div>
Bitdigital
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
September 07, 2014, 04:28:25 AM
 #2

I can do that pm me detail via pm.
Envrin (OP)
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
September 07, 2014, 04:35:07 AM
 #3

I can do that pm me detail via pm.

No, project is stated above, and very straight forward.  It's public, so I'm not going to screw you.  Provide the working CSS code and your BTC address, and I'll send 0.2 BTC.  Simple as. Smiley
Bitdigital
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
September 07, 2014, 04:38:26 AM
 #4

I can do that pm me detail via pm.

No, project is stated above, and very straight forward.  It's public, so I'm not going to screw you.  Provide the working CSS code and your BTC address, and I'll send 0.2 BTC.  Simple as. Smiley

First you need to give me your website source code to run on any platform.
And you mean after I edit the CSS will you make payments
Envrin (OP)
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
September 07, 2014, 04:45:31 AM
 #5


Code is posted above, and for example, here:  http://jsfiddle.net/fxpuorz4/

For example, click on the "Support" menu and it expands without problem.  However, click on one of the sub-menus, and it just collapses the parent menu, instead of redirecting the user.  I need it to redirect the user.  Again, no Javascript allowed.

Post the working code here publicly, as it may help someone else as well, plus your BTC address and I'll send you 0.2 BTC.
NLNico
Legendary
*
hacker
Offline Offline

Activity: 1876
Merit: 1295


DiceSites.com owner


View Profile WWW
September 07, 2014, 04:50:39 AM
Last edit: September 07, 2014, 05:00:41 AM by NLNico
 #6

See here:
http://jsfiddle.net/mrsg3mdm/

LMK if something doesn't work.


BTC
1Fcn7M1AjgA9RFPm59RqiTCCD6tKKS5vN9

gogodr
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250



View Profile
September 07, 2014, 04:58:05 AM
 #7

Code:
<html>
<header>
<style type="text/css">
.cnav {
    position: relative;
    display: block;
    background-color: hotpink;

    -webkit-transition: all 1s; /* For Safari 3.1 to 6.0 */
    transition: all 1s;
}


.cnav ul {
    list-style-type: none;
}

.cnav ul > li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.cnav ul li > a {
    font-size:14px;
    height:38px;
    width:100%;
    line-height:38px;
    border-bottom: 1px solid #c4c4c4;
    border-top: 1px solid white;
    color: #3f3f3f;
}

.cnav ul li > .sub {
    display: none;
    background: rgb(255,255,255);
    margin-top:0px;
    width:100%;
}

#Home:target{
display: block;  left: 0px;
}
#Products:target{
display: block;  left: 0px;
}
#Support:target{
display: block;  left: 0px;
}

</style>
</header>
<body>
<div class="cnav">
     <ul>
          <li><a href="#Home">Home</a>
                 <ul id="Home" class="sub">
                     <li><a href="/about">About Us</a></li>
                     <li><a href="/page1">Some Page</a></li>
                     <li><a href="/page2">Another Page</a></li>
                 </ul>
          </li>
          <li><a href="#Products">Products</a>
                 <ul id="Products" class="sub">
                     <li><a href="/about">About Us</a></li>
                     <li><a href="/page1">Some Page</a></li>
                     <li><a href="/page2">Another Page</a></li>
                 </ul>
          </li>
          <li><a href="#Support">Support</a>
                 <ul id="Support" class="sub">
                     <li><a href="/about">About Us</a></li>
                     <li><a href="/page1">Some Page</a></li>
                     <li><a href="/page2">Another Page</a></li>
                 </ul>
          </li>
     </ul>
</div>
</body>
</html>

http://jsfiddle.net/ms8nevLv/

this is my take on it. take it if you like it. Its a simpler solution.

my BTC address is in my signature Tongue
Envrin (OP)
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
September 07, 2014, 05:00:08 AM
 #8

BTC
1Fcn7M1AjgA9RFPm59RqiTCCD6tKKS5vN9

Awesome, thanks dude, you're a life saver!  0,22 BTC sent, extra tip for being quick!  Thanks again, appreciate it!

https://blockchain.info/tx/9eceba5a9b74f5c2d16e730f2d362a207589cfaf8b1bd91b70844137e6f5c908

For everyone else, reward closed!
NLNico
Legendary
*
hacker
Offline Offline

Activity: 1876
Merit: 1295


DiceSites.com owner


View Profile WWW
September 07, 2014, 05:04:21 AM
 #9

Thank you Smiley if you have any problem modifying it in your design don't hesitate to PM me.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!