Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #327145

    Hi there,

    I will need some help to make a sub-menu on a page responsive because it´s hiding complete on mobiles.
    It would be nice to order the items one below other on phones.

    THX a lot for a quick hint

    I build it with some html und css inserted in Text Element and custom css as below:

    html:

    <!-- Start css3menu.com BODY section -->
    <ul id="css3menu1" class="topmenu">
    	<li class="topmenu"><a class="pressed" style="height: 30px; line-height: 30px;" href="#productions">PRODUCTIONS</a></li>
    	<li class="topmenu"><a style="height: 30px; line-height: 30px;" href="#media">MUSIC FOR MEDIA, FILM & ADVERTISING</a></li>
    	<li class="toplast"><a style="height: 30px; line-height: 30px;" href="#songwirting">SONGWRITING</a></li>
    </ul>
    <p class="_css3m"><!-- End css3menu.com BODY section --></p>

    CSS:

    ul#css3menu1{
    	margin:0 0%;list-style:none;padding:0 0%;background-color:;border-width:0;border-style:solid;border-color:;font-size:0;width:100%;z-index:999;position:relative;display:inline-block;zoom:1;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;
    	*display:inline;*padding-right:0.53%;}
    ul#css3menu1 li{
    	display:block;white-space:nowrap;font-size:0;float:left;}
    * html ul#css3menu1 li a{
    	display:inline-block;}
    ul#css3menu1>li{
    	margin:0;width:33%;}
    ul#css3menu1 li.toplast{
    	width:34%;}
    body:first-of-type ul#css3menu1{
    	display:inline-table;border-spacing:0px 0;}
    body:first-of-type ul#css3menu1>li{
    	display:table-cell;float:none;}
    ul#css3menu1 a:active, ul#css3menu1 a:focus{
    	outline-style:none;}
    ul#css3menu1 a{
    	display:block;vertical-align:middle;text-align:center;text-decoration:none;font:20px oswald;color:#4b4b4d;cursor:default;padding:3px;background-color:#FFFFFF;background-repeat:repeat;border-width:0px;border-style:none;border-color:;}
    ul#css3menu1 li:hover>a,ul#css3menu1 li a.pressed{
    	background-color:#FFFFFF;border-style:none;color:#008fbf;text-decoration:none;}
    ul#css3menu1 > label.switch{
    	display:none;cursor:pointer;width:25px;height:20px;padding:0px 10px 0px 10px;}
    ul#css3menu1 > label.switch:before{
    	content:"";position:absolute;display:block;height:4px;width:25px;border-radius:4px;background:#4b4b4d;-moz-box-shadow:0 8px #4b4b4d, 0 16px #4b4b4d;-webkit-box-shadow:0 8px #4b4b4d, 0 16px #4b4b4d;box-shadow:0 8px #4b4b4d, 0 16px #4b4b4d;}
    ul#css3menu1 > label.switch:hover:before{
    	background:#008fbf;-moz-box-shadow:0 8px #008fbf, 0 16px #008fbf;-webkit-box-shadow:0 8px #008fbf, 0 16px #008fbf;box-shadow:0 8px #008fbf, 0 16px #008fbf;}
    ul#css3menu1 > .switchbox{
    	display:none;}
    ul#css3menu1>li>a{
    	padding:0px 10px 0px 10px;}
    ul#css3menu1 li.topmenu>a{
    	border-width:0 0 3px 0;border-style:none;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;padding:0px 10px 0px 10px;}
    ul#css3menu1 li.topmenu:hover>a,ul#css3menu1 li.topmenu a.pressed{
    	border-style:none;}
    ul#css3menu1 li.toplast>a{
    	border-width:0 0 3px 0;border-style:none;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;padding:0px 10px 0px 10px;}
    ul#css3menu1 li.toplast:hover>a,ul#css3menu1 li.toplast a.pressed{
    	border-style:none;}
    ul#css3menu1>li:nth-of-type(1){width:23%}ul#css3menu1>li:nth-of-type(2){width:55%}ul#css3menu1>li:nth-of-type(3){width:22%}
    @-moz-document url-prefix(){body:first-of-type ul#css3menu1{display:inline-block} body:first-of-type ul#css3menu1>li{display:block;float:left !important;}}
    @media only screen and (max-width:565px),only screen and (max-device-width:565px){
    ul#css3menu1>li:nth-of-type(1){width:29%}ul#css3menu1>li:nth-of-type(2){width:71%}ul#css3menu1>li:nth-of-type(3){width:100%}body:first-of-type ul#css3menu1{display:inline-block} body:first-of-type ul#css3menu1>li{display:block;float:left !important;}}
    @media screen and (max-width: 768px) {
    	ul#css3menu1 > li {
    		position: initial;}
    	ul#css3menu1 ul .submenu,ul#css3menu1 li > ul {
    		left: 0; right:auto; top: 100%;}
    	ul#css3menu1 .submenu,ul#css3menu1 ul,ul#css3menu1 .column {
    		-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;padding-right: 0;width: 100% !important;}
    }
    @media screen and (max-width: 438px) {
    	ul#css3menu1 {
    		width: 100%;}
    	ul#css3menu1 > li {
    		display: none !important;		position: relative;		width: 100% !important;}
    	ul#css3menu1 > label.switch,ul#css3menu1 .switchbox:checked ~ li {
    		display: block !important;}
    }
    #327564

    Hello!

    Unfortunately this is beyond the scope of the support we can offer. If you really need it try contacting a developer.

    Cheers!
    Josue

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.