Side bar with Way points - html

Hey my name is Kasper!
I'm making a side bar where on my portfolio website, I just learned about #Way points some day's ago.
And now I want to add that to my menu bar, But I can't seem to get it right, this is what my code looks like:
<!-- /#sidebar-wrapper ----------------------------------------------------------------------->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<div class="menu-links scroll-me">
<li class="sidebar-brand">
<div href="#">
<a href="#header">
<img class="ImageFixsTyle" src="assets/img/logsmall.png" alt="SbnLogo" /></a>
</div>
</li>
<hr />
<li><i class="fa fa-archive fa-2x"></i></li>
<hr />
<li><i class="fa fa-globe fa-spin fa-2x"></i></li>
<hr />
<li><i class="fa fa-user-plus fa-2x"></i></li>
<hr />
<li><i class="fa fa-mars-stroke fa-2x"></i></li>
<hr />
<li><i class="fa fa-envelope fa-2x"></i></li>
<hr />
</div>
</ul>
</div>
<!-- /#sidebar-wrapper ----------------------------------------------------------------------->
The Code can be seen in action on : http://kaslabdesign.dk/
now What I want to happen is each time I come to one of my Menu points The menu point we are at needs to be high Lighted.
I have looked at some guides but none of them have anything to do with my specific problem.
I hope anyone can help me to solve my problem since i'm soon bald because of this.
have a nice day/evening & thank you for reading this.
best regards Kasper.
p.s I hope someone can help me ;)! and I hope i explain good enought..

Try using http://imakewebthings.com/waypoints/guides/jquery-zepto/
Handle each block as waypoint and when it is hit, highlight the associated link in the menu. The association is made by the href attribute.
$(function() {
$('p').waypoint({
handler: function(direction) {
$("a").css("color", "");
$("a[href='#" + this.element.id + "']").css("color", "red");
}
})
});
ul {
position:fixed;
top:0;
left:0;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.0/jquery.waypoints.js"></script>
<ul>
<li>
item1
</li>
<li>
item2
</li>
<li>
item3
</li>
</ul>
<div>
<p id="item1">a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br></p>
<p id="item2">a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br></p>
<p id="item3">a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br></p>
</div>

Related

HTML Webpage - sections - convert data-bg-img to background image

I bought a webpage ( files ) and on some website hosting providers it works, on others it doesn't.
And was wondering if any of you can point me in the right direction on how to change the index.html content to display the correct background image.
The webpage is static, divided into sections, having the below structure for the sidebar which hides/shows different section, with different background image.
<div class="inner">
<nav id="tmMainNav" class="tm-main-nav">
<ul>
<li>
<a href="#intro" id="tmNavLink1" class="scrolly active" data-bg-img="images/Homepage.png" data-page="#tm-section-1">
<i class="fas fa-home tm-nav-fa-icon"></i>
<span>Introduction</span>
</a>
</li>
<li>
<a href="#products" id="tmNavLink2" class="scrolly" data-bg-img="images/Portofolio.jpg" data-page="#tm-section-2" data-page-type="carousel">
<i class="fas fa-map tm-nav-fa-icon"></i>
<span>Projects</span>
</a>
</li>
<li>
<a href="#company" id="tmNavLink3" class="scrolly" data-bg-img="images/Projects.png" data-page="#tm-section-3">
<i class="fas fa-users tm-nav-fa-icon"></i>
<span>Qualifications</span>
</a>
</li>
<li>
<a href="#contact" id="tmNavLink4" class="scrolly" data-bg-img="images/Contact.jpg" data-page="#tm-section-4">
<i class="fas fa-comments tm-nav-fa-icon"></i>
<span>Contact</span>
</a>
</li>
</ul>
</nav>
</div>
How should I change "data-bg-img="images/Homepage.png" " to actually render background-image ?
I think if it was possible, would have been awesome, to put into the CSS at the top of the page, in the style, all the background images, and somehow to trigger the one for which the section is currently viewed.
The sections are called from this:
<!-- section 1 -->
<section id="tm-section-1" class="tm-section">
<div class="ml-auto">
<div class="myDiv">
<header class="mb-4"><h1 class="tm-text-shadow"><strong> greetings </strong></h1></header>
Continue
<!-- data-nav-link holds the ID of nav item, which means this link should behave the same as that nav item -->
</div>
</div>
</section>

Random <a></a> appeared in HTML code after site went live

Basically my problem is what my question is saying. Before some time we had build
a site using Django and it's build in DB. The site had some problems but we fixed the and we got it live. After that we saw a major mistake in the footer where all the three sections where out
of place. This was do to a random in the HTML code after we incpect element:
This is how the footer is implemented in every page.
</body>
{% include "main/footer.html" %}
</html>
Footer code in server
<div class="content">
<section>
<img class="footer-logo" src="{% static 'material/imgs/logo_banner_inverted.svg' %}" alt="" srcset="">
<!-- <p><i class="fa fa-folder"> </i>dummy#gmail.com</p> -->
</section>
<section class="inline">
<h4 >Our Social Media</h4>
<ul class="">
<li class="no-bottom"><i class="fa fa-facebook"> </i>Facebook</li>
<li class="no-bottom"><i class="fa fa-instagram"> </i>Instagram</li>
<li class="no-bottom"><i class="fa fa-linkedin "> </i>Linkedin</li>
</ul>
</section>
<section>
<h4 >Menu</h4>
<ul>
<li><i class=""> </i>Home</li>
<li><i class=""> </i>About us</li>
<li><i class=""> </i>Contact</li>
</ul>
</section>
</div>
Footer code presented in live site
<a>
</a><div class="content"><a>
<section>
<img class="footer-logo" src="/static/material/imgs/logo_banner_inverted.svg" alt="" srcset="">
<!-- <p><i class="fa fa-folder"> </i>dummy#gmail.com</p> -->
</section>
</a><section class="inline"><a>
<h4>Our Social Media</h4>
</a><ul class=""><a>
</a><li class="no-bottom"><a></a><i class="fa fa-facebook"> </i>Facebook</li>
<li class="no-bottom"><i class="fa fa-instagram"> </i>Instagram</li>
<li class="no-bottom"><i class="fa fa-linkedin "> </i>Linkedin</li>
</ul>
</section>
<section>
<h4>Menu</h4>
<ul>
<li><i class=""> </i>Home</li>
<li><i class=""> </i>About us</li>
<li><i class=""> </i>Contact</li>
</ul>
</section>
I am not an expert and I did some research and it just seams like a bug.
It was indeed a bug. It seems that the problem wasn't even at footer but in the page
that was generated in. In the text of the page we had this code <a class="hover-link a-link" href="some-link"> Link for text </a>.
Somehow that caused the unexpected bug (if someone knows how that happened I would be happy to learn).
Our solution was to just change it like that <h><a class="hover-link a-link" href="some-link"> Link for text </a></h>

Foundation - Top Bar and Icon Bar in one template

I'm working on Foundation Zurb template and I'm trying to get it working.
I have Top Bar at the top of the screen (full width), Icon Bar at the left side (full height). I know that Foundation has 12 grid system.
According to Foundation:
The Foundation Top Bar gives you a great way to display a complex
navigation bar on small, medium or large screens.
And:
An Icon Bar provides a menu to quickly navigate an app. Use the Icon
Bar horizontally or vertically, with the labels below the icons or to
the right. Have it your way.
Here is my template. I've took out div.large-9.columns etc.. Because they were braking the view.
<!-- Navigation -->
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1>LOGO PLACEHOLDER</h1>
</li>
<li class="toggle-topbar menu-icon"><span>Menu</span></li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li class="active"><i class="fa fa-diamond"></i> Go PRO</li>
<li class="has-dropdown">
<i class="fa fa-user"></i> My Account
<ul class="dropdown">
<li>Some Li's here</li>
</ul>
</li>
</ul>
<!-- Left Nav Section -->
<ul class="left">
<li><i class="fa fa-database"></i> ONE</li>
<li><i class="fa fa-list-ol"></i> TWO</li>
<li><i class="fa fa-users"></i> THREE</li>
</ul>
</section>
</nav>
<!-- Left Nav Sidebar -->
<div class="icon-bar vertical five-up">
<a class="item">
<i class="fa fa-home"></i>
<label>Home</label>
</a>
<a class="item">
<i class="fa fa-gamepad"></i>
<label>ONE</label>
</a>
<a class="item">
<i class="fa fa-star"></i>
<label>TWO</label>
</a>
<a class="item">
<i class="fa fa-thumbs-up"></i>
<label>THREE</label>
</a>
<a class="item">
<i class="fa fa-trophy"></i>
<label>FOUR</label>
</a>
</div>
I want to achieve:
Top Bar and Icon Bar the same
Content Area to be fixed and have large-8 or large-9
Sidebar to be fixed and have large-3
What I've already tried:
Was separating all 3 bits with div.large-1/8/3, nothing happened
Was nesting them into div.row
I think I've tried almost everything, but have no idea, what is the problem.
i had done the changes in html and css. this what your expecting
html code
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1>LOGO PLACEHOLDER</h1>
</li>
<li class="toggle-topbar menu-icon"><span>Menu</span></li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li class="active"><i class="fa fa-diamond"></i> Go PRO</li>
<li class="has-dropdown">
<i class="fa fa-user"></i> My Account
<ul class="dropdown">
<li>Some Li's here</li>
</ul>
</li>
</ul>
<!-- Left Nav Section -->
<ul class="left">
<li><i class="fa fa-database"></i> ONE</li>
<li><i class="fa fa-list-ol"></i> TWO</li>
<li><i class="fa fa-users"></i> THREE</li>
</ul>
</section>
</nav>
<!-- Left Nav Sidebar -->
<div class="medium-1 columns left-nav">
<div class="icon-bar vertical five-up">
<a class="item">
<i class="fa fa-home"></i>
<label>Home</label>
</a>
<a class="item">
<i class="fa fa-gamepad"></i>
<label>ONE</label>
</a>
<a class="item">
<i class="fa fa-star"></i>
<label>TWO</label>
</a>
<a class="item">
<i class="fa fa-thumbs-up"></i>
<label>THREE</label>
</a>
<a class="item">
<i class="fa fa-trophy"></i>
<label>FOUR</label>
</a>
</div>
</div>
<div class="medium-8 columns content-area">content-area</div>
<div class="medium-3 columns sidebar">columns sidebar</div>
css code
.columns.content-area{border:1px solid #111;padding:0}
.columns.sidebar{border:1px solid #111;padding:0}
.columns.left-nav{padding:0}
.icon-bar.vertical.five-up{width:100%}
demo jsFiddle

Image/Link alignment issue with bottom navbar

I have a small issue. I've added a bottom navbar with 3 social icons and a text to present what are these icons. Screenshot
I would like to put this text really at the right, or left, but not like this. It does the same thing if I do in the other side.
Like that the icons would be really at the middle.
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
<div class="container">
<p class="navbar-text navbar-right text-right">Suivre l'IUT de Lens</p>
<div class="social">
<ul>
<li><i class="fa fa-lg fa-facebook"></i></li>
<li><i class="fa fa-lg fa-twitter"></i></li>
<li><i class="fa fa-lg fa-google-plus"></i></li>
</ul>
</div>
</div>
</nav>
First, I should comment that I don't see any question marks in your "question." I would urge you to edit your question to be more clear for future readers' sake. In any case, I think I know what you are asking (the picture did help). The answer is, you need CSS!
There are more than one way to accomplish the spacing and placement you want. Here's one:
HTML (I removed some stuff that didn't seem to matter):
<nav>
<p style="width:100%">
<div class="linktext">
Suivre l'IUT de Lens
</div>
<div class="linkgroup">
<i class="link fa fa-lg fa-facebook"></i>
<i class="link fa fa-lg fa-twitter"></i>
<i class="link fa fa-lg fa-google-plus"></i>
</div>
</p>
CSS:
.link {
padding-right: 10px
}
.linkgroup{
padding-right:20px;
float:right;
}
.linktext {
padding-right:20px;
float: right;
}
So, you just need to define your properties in the CSS, then assign the relevant CSS class to your <div>/<p>/<whatever>
Here is a JSFiddle: http://jsfiddle.net/af8rpc99/

can someone tell me the meaning of #id:checked~section{} in css3

I am trying to create animated menu from the reference of 'codepen' but i don't understand the code written below can someone help me, its the first time i saw the code like this, its looks like selector but cant help it to understand
HTML :
<div id="wrapper">
<div class="mobile">
<!-- Checkbox to tonggle the menu -->
<input type="checkbox" id="tm"/>
<ul class="sidenav">
<li><i class="fa fa-apple"></i></li>
<li><i class="fa fa-windows"></i></li>
<li><i class="fa fa-android"></i></li>
<li><i class="fa fa-dribbble"></i></li>
<li><i class="fa fa-tumblr"></i></li>
<li><i class="fa fa-github"></i></li>
<li><i class="fa fa-youtube-play"></i></li>
<li><i class="fa fa-dropbox"></i></li>
<li><i class="fa fa-twitter"></i></li>
<li><i class="fa fa-vimeo"></i></li>
<li><i class="fa fa-skype"></i></li>
</ul>
<!-- Content area -->
<section>
<!-- Label for #tm checkbox -->
<label for="tm">Menu</label>
</section>
#ID:checked~section{
}
It means inside particular ID, if the check box is checked then its section(sibling) must have following properties
tilde(~) is a general sibling combinator
For more Information Check this link