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>
Related
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>
I am using nav with li, ul to form a menu bar. In that menu bar I have different-different heading and one arrow icon with them. But the problem is icon is not responsive and it is showing in different-2 position in different -2 screen resolution.
HTML
<li>
<a style="cursor: pointer">
<i class="fa fa-user"></i>
Agent Access
<span class="fa fa-chevron-down" id="arrow"></span>
<ul>
</ul>
</a>
</li>
<li>
<a style="cursor: pointer">
<i class="fa fa-file"></i>
Reports
<span class="fa fa-chevron-down" id="arrow"></span>
</a>
<ul>
</ul>
</li>
I wants that arrow icon should be responsive for every menu heading(should be on same place at every li no maater the text is short or long) and on every screen resolution.See the Image for reference
Materialize CSS Sidenav works on desktop browser: the sidebar shows up when clicked. But when I tested it on the mobile browser, the menu icon shows, but when clicked it does not open the side bar. The html/css source is given below:
<nav class="white">
<div class="nav-wrapper" >
<a href="/" class="brand-logo center">
<img src="/images/brand.png" width="150"/>
</a>
<a data-target="slide-out" class="sidenav-trigger">
<i class="large material-icons cyan-text text-darken-4">menu</i>
</a>
<ul id="slide-out" class="sidenav">
<li>
<ul class="collapsible collapsible-accordion">
<li>
<a class="collapsible-header">Login<i class="material-icons right">arrow_drop_down</i></a>
<div class="collapsible-body">
<ul>
<li>Employer</li>
<li>Job Seeker</li>
</ul>
</div>
</li>
</ul>
</li>
</ul>
</div>
and the js init source is
$('.sidenav').sidenav();
Thanks
enter image description here
Try to copy code from documentation and modify according to your needs.
try zIndex=1 to sidenav and nav class
<div class="item slides">
<div class="slide-12"></div>
<div class="hero3">
<h1>Reach out at</h1>
<a href="https://www.linkedin.com/in/sowmiya-nagarajan/"
class="fa fa-linkedin"></a>
<a href="https://github.com/strangest-quark" class="fa fa-
github"></a>
<a href="https://www.snapchat.com/add/strangely-quark"
class="fa fa-snapchat-ghost"></a>
<a href="https://www.facebook.com/nagarajan.sowmiya"
class="fa fa-facebook"></a>
<a href="https://www.instagram.com/strange._.quark/"
class="fa fa-instagram"></a>
</div>
</div>
The hyperlinks in the above code snippet are not clickable. It could be a problem of another overlapping div. The links work when I use tab.
I tried z-index in different combinations, but none of them seem to work!
Find the complete html and css file in the following links:
CSS
HTML
Any help appreciated.
I added some text inside the anchor tags. But it seems you are needing to show them just as Font Awesome icons. In that case a single space character will be enough. Or well a
<div class="hero3">
<h1>Reach out at</h1>
<a href="https://www.linkedin.com/in/sowmiya-nagarajan/"
class="fa fa-linkedin"> sowmiya-nagarajan</a>
<a href="https://github.com/strangest-quark" class="fa fa-
github"> strangest-quark</a>
<a href="https://www.snapchat.com/add/strangely-quark"
class="fa fa-snapchat-ghost"> strangely-quark</a>
<a href="https://www.facebook.com/nagarajan.sowmiya"
class="fa fa-facebook"> </a>
<a href="https://www.instagram.com/strange._.quark/"
class="fa fa-instagram"> </a>
</div>
The links have no content inside them. What you can do if you want icon only links is to put the fa-* classes on a span or i tag inside the a tag like so:
<a href="https://example.com" >
<span class="fa fa-linkedin"></span>
</a>
This then causes the a tag to actually have content and be clickable.
I'm making a portfolio page here (http://198.96.94.51/v2/) and while clicking on the navigationMenu links on the side really fast, they don't seem to redirect to the proper anchor (some of them don't move the page at all). I've initialized my anchor tags like this
<ol class="curtains">
<li id="home" class="cover">
<a id="home"></a>
<header data-fade="550" data-slow-scroll="3">
<h1>John Smith</h1>
<h2>HOBBY/JOB TITLE</h2>
</header>
</li>
</ol>
My navbar code -
<ul id="navigationMenu">
<li>
<a class="home" href="#home">
<span>Home</span>
</a>
</li>
<li>
<a class="about" href="#about">
<span>About</span>
</a>
</li>
<li>
<a class="projects" href="#projects">
<span>Projects</span>
</a>
</li>
<li>
<a class="resume" href="#resume">
<span>Resume</span>
</a>
</li>
<li>
<a class="contact" href="#contact">
<span>Contact us</span>
</a>
</li>
</ul>
But just clicking on the navbar, or even typing #home into the address bar won't bring the browser back to the top sometimes. Is there anything I'm doing wrong?
Ids identify anchor points so they must be unique.
But if you just want to go to the top of the page you should try a simple # as value for your href attribute.
A link to the id of e.g. a <div> tag would lead you to this <div> tag.
<div id="anchor"></div>
this fiddle shows you: http://jsfiddle.net/aYGFR/1/
You can give like this: <a id="home" href="home.php">Home</a>