I'm having a bit o dificulty making this work.
This is my first website, I'm using Zurb and finding it good so far.
I'm trying to implement a responsive nav, but it isn't working. The one I'm trying is this one: http://responsive-nav.com/#instructions. I made everything they ask to, but it still don't work. It's the same as not adding code at all to the website.
Some of the nav's code, if it helps:
<div class="row" id="row-top">
<div class="large-4 small-8 columns logo">
<img src="img/logo.png" alt="Laboratório Morales">
</div> <!-- logo -->
<div class="large-8 small-12 columns nav">
<ul class="inline-list menu-principal">
<li>Laboratório</li>
<li>Exames</li>
<li>Convênios</li>
<li>Estrutura</li>
</ul> <!-- menu-principal -->
</div> <!-- menu-principal div -->
</div> <!-- row topo -->
Calling in the head, and bottom of body:
<link rel="stylesheet" href="css/responsive-nav.css"> <!-- responsive nav -->
<script src="js/responsive-nav.js"></script> <!-- responsive nav -->
<script>
var navigation = responsiveNav("#nav");
</script> <!-- responsive nav -->
Hm ... you are passing an id #nav. But you put nav in the class property. It should be
<div class="large-8 small-12 columns" id="nav">
Isn't it?
Related
I recently started using VS Code, I did my best to research how to put empty line between sibling elements in html automatically through VS options without the need of putting it manually, but nothing. The following snippet triggers when I type "tabs" and hit tab.
Current result:
<div class="tabs js-tabs">
<div class="tabs__head">
<div class="tabs__nav"></div><!-- /.tabs__nav -->
</div><!-- /.tabs__head -->
<div class="tabs__body">
<div class="tab"></div><!-- /.tab -->
</div><!-- /.tabs__body -->
</div><!-- /.tabs js-tabs -->
Desired result:
<div class="tabs js-tabs">
<div class="tabs__head">
<div class="tabs__nav"></div><!-- /.tabs__nav -->
</div><!-- /.tabs__head -->
<div class="tabs__body">
<div class="tab"></div><!-- /.tab -->
</div><!-- /.tabs__body -->
</div><!-- /.tabs js-tabs -->
You can insert empty text node {} so Emmet will format it as newline:
.tabs>.tabs_head+{}+.tabs_body
expands to the following result in Sublime Text:
<div class="tabs">
<div class="tabs_head"></div>
<div class="tabs_body"></div>
</div>
I have a counter in my html code. I want to align this counter in the middle of the site. There is a helper class, called text-align which works with almost all objects on the site but i don't know how to align a script entry.
My code looks like this:
<section class="wow fadeIn">
<div class="container-fluid full-screen position-relative no-padding no-transition" >
<div class="opacity-medium bg-white"></div>
<div id="animated-balls"></div>
<div class="slider-typography xs-position-inherit">
<div class="slider-text-middle-main">
<div class="slider-text-top slider-text-middle2">
<!-- logo -->
<div class="coming-soon-logo"><img class="logo-style-2" src="images/offene-stadt.png" alt=""/></div>
<!-- end logo -->
<span class="coming-soon-title text-uppercase gray-text margin-ten no-margin-lr no-margin-bottom">We're getting ready to launch</span>
<!-- time -->
<div id="counter-underconstruction2" class="white-text text-center margin-two no-margin-lr no-margin-bottom"></div>
<div id="countdown-target" class="text-center"></div>
<script>
var myCountdown1 = new Countdown({time:86400*20});
</script>
</div>
<!-- end time -->
You can set a target to point it at a specific item so try this:
<div class="slider-text-top slider-text-middle2">
<!-- logo -->
<div class="coming-soon-logo"><img class="logo-style-2" src="images/logo-light-big.png" alt=""/></div>
<!-- end logo -->
<span class="coming-soon-title text-uppercase gray-text margin-ten no-margin-lr no-margin-bottom">We're getting ready to launch</span>
<!-- time -->
<div id="counter-underconstruction2" class="white-text text-center margin-two no-margin-lr no-margin-bottom"></div>
<i class="icon-anchor medium-icon"></i>
<div id="countdownTarget" class="center-block"></div>
<script>
var myCountdown1 = new Countdown({time:316, target: "countdownTarget"});
</script>
<!-- end time -->
</div>
And then use your existing text-align technique on the #countdownTarget to position it how you like.
I wanna know why the logo is not showing on mobile devices, I tried resetting my network on phone, and reset web browser.I also try making the logo little smaller from 100px to 80px but still it's not showing. Here is the code below. Please Help Thanks is advance. Here is the working jsfiddle https://jsfiddle.net/light22/60xrbkhf/#&togetherjs=fHfHVyawIa
<header id="header" class="transparent-header" data-sticky-class="not-dark">
<div id="header-wrap" style="height:180px;">
<!-- Primary Navigation "
============================================= -->
<nav id="primary-menu" class="style-2 center">
<!--<div class="container clearfix"></div>-->
<div id="primary-menu-trigger"><i class="icon-reorder"></i></div>
<div style="text-align:center">
<ul class="one-page-menu" data-easing="easeInOutExpo" data-speed="1250" data-offset="65" >
<li><div style="border-bottom:1px solid #000">Home</div></li>
<li><div>WHO WE ARE</div></li>
<li><div>WHAT WE TRADE</div></li>
<li><div>SERVICES</div></li>
<li><div>LOGISTICS</div></li>
<li><div>CONTACT</div></li>
</ul>
</div>
</nav><!-- #primary-menu end -->
<!-- Logo
============================================= -->
<div id="logo" class="divcenter">
<img class="divcenter" src="images/logo.png" alt="Canvas Logo">
<img class="divcenter" src="images/logo#2x.png" alt="Canvas Logo">
</div><!-- #logo end -->
<br>
</div>
</header><!-- #header end -->
Rename image in your images folder
1logo#2x.png to logo#2x.png
I am trying to get the slider to work here and think I have the code but something isn't working right. It is only showing the image in the CSS and not rotating through the other ones.
Script in Header:
var images=new Array('/images/home/AC-InStock-Rotating.jpg', '/images/home/AC- MXV-Rotating.jpg', '/images/home/AC-Rental-Rotating.jpg');
var nextimage=0;
doSlideshow();
function doSlideshow(){
if(nextimage>=images.length){nextimage=0;}
$('.home-middle-part')
.css('background-image','url("'+images[nextimage++]+'")')
.fadeIn(500,function(){
setTimeout(doSlideshow,1000);
});
}
Body:
<div class="home-middle-part">
<div class="container clearfix">
<div class="grid_12 omega" >
<div class="grid_6 omega" >
<div style="padding-left: 10px;">
</div>
</div> <!-- end of grid 6-->
<div class="grid_6 omega" >
<div>
<table>
</table>
</div>
</div> <!-- end of grid 6-->
</div> <!-- end of grid 12 -->
</div> <!-- end of container clearfix -->
</div> <!-- end of home-middle-part -->
CSS
.home-middle-part {
background-image: url("/images/home/body-image banner1.jpg");
background-repeat: no-repeat;
}
You script in the header is running before the browser knows that .home-middle-part exists. You need doSlideshow(); to run after the HTML has been parsed. You can do this by moving your script tag the bottom of the page or you can wrap your call to doSlideshow() in $(document).ready() like so:
$(document).ready(function() {
doSlideshow();
});
HTML
<div class="row-fluid" id="content-row">
<div class="span12">
<div class="row-fluid">
<div class="span4" id="home-logo">
<img src="img/layout/logo.png" id="logo">
<ul id="subnav">
<!-- Loaded via AJAX -->
</ul>
</div><!-- ./span4 -->
<div class="span8" id="home-copy">
<p id="home-p">
Foxcode is an investment and merchant banking Firm which advises and invests in small to mid-market companies and projects globally.
</p>
</div><!-- ./span8 -->
</div><!-- ./row-fluid -->
</div><!-- span12 -->
</div><!-- ./row-fluid -->
I try to set #subnav{margin-left: } or #subnav li{margin-left: } to control the element position so it goes to the right a little bit, but nothing happens when I try to.
Concerned element
<ul id="subnav">
<!-- Loaded via AJAX -->
</ul>
Try adding to your CSS:
#subnav{
padding:0px;
margin:0px;
margin-left:10px;
}
JSFiddle