"HTML: Error: <nav> is not recognized!" In Komodo Edit - html

I am working on an index.html file and inside my head and body tag, I have a nav element. However, in Komodo Edit, version 10.1.1, build 17414, platform linux-x86_64., It red-underlines the nav element and gives me the following erorr message:
HTML: Error: <nav> is not recognized!
This is what my code looks like:
<html>
<head>
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="/static/js/script.js"></script>
<script src="/socket.io/socket.io.js"></script>
</head>
<body><div class="sidebar"></div><nav class="main menu">
<ul class = button-container>
<li>
<i class="fa fa-font" style="font-size:6em;"></i>
</li>
...
<li>
<i class="fa fa-picture-o" style="font-size:6em;"></i>
</li>
</ul>
<ul class="export button-container">
<li>
<i class="fa fa-floppy-o" style="font-size:6em;"></i>
</li>
</ul>
</nav>
<nav class="menu font" style="display: none;">
<p>Font</p>
</nav>
...
<nav class="menu picture" style="display: none">
<p>Pictures</p>
</nav>
</body>
</html>
Does anyone know what might be causing this?

Komodo has 2 "Languages" that cover HTML, one is called "HTML" and one is called "HTML5". HTML5 covers the nav element, HTML does not. You need to change your language selection to HTML5.
The language selection is done from the right side of the statusbar, it should currently say "HTML".

Can this Work?
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="/static/js/script.js"></script>
<script src="/socket.io/socket.io.js"></script>
</head>
<body><div class="sidebar"></div><nav class="main menu">
<ul class = button-container>
<li>
<i class="fa fa-font" style="font-size:6em;"></i>
</li>
...
<li>
<i class="fa fa-picture-o" style="font-size:6em;"></i>
</li>
</ul>
<ul class="export button-container">
<li>
<i class="fa fa-floppy-o" style="font-size:6em;"></i>
</li>
</ul>
</nav>
<nav class="menu font" style="display: none;">
<p>Font</p>
</nav>
...
<nav class="menu picture" style="display: none">
<p>Pictures</p>
</nav>
</body>
</html>
this Might not work but guess Ill try

Related

Fontawesome doesn't work, the icons aren't shown

The problem is that my website aren't shown the Icons. I am a starter and I don't see some error there.
Here is the Code:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
and here I tried to use icons:
<div class="navigation">
<ul>
<li>
<a href="#">
<span class="icon"><i class="fas fa-home"></i></span>
<span class="title">Home</span>
</a>
</li>
</ul>
</div>
That is not the full code but I think it should display an icon.
The fas variant doesn't exist in that library. Use fa.
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" ntegrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<div class="navigation">
<ul>
<li>
<a href="#">
<span class="icon"><i class="fa fa-home"></i></span>
<span class="title">Home</span>
</a>
</li>
</ul>
</div>

Cant figure out how to make this nav tab a dropdown menu

I just haven't been able to figure out the syntax
I am trying to have a drop-down menu appear when I click on the second button.
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity=
"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin=
"anonymous" type="text/css" />
<!-- Font Awesome -->
<script src="https://use.fontawesome.com/926120954b.js" type="text/javascript">
</script>
<!-- My CSS -->
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<ul class="nav nav-tabs">
<li role="presentation"><i class="fa fa-home fa-1g" aria-hidden="true"></i></li>
<!-- ****BEGIN THE DROPDOWN TAB-->
<li role="Presentation" class="dropdown-menu">
<a class="Pet" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
Community <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li>item</li>
</ul>
</li>
<!-- ***END THE DROPDOWN TAB -->
<li role="presentation">Pet Help</li>
<li role="presentation">Pets for Sale</li>
<li role="presentation">Pet Services</li>
</ul>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" type=
"text/javascript">
</script>
</body>
</html>
My first attempt at making a nav menu. (For some reason, I am unable to submit this question without providing "details" so please forgive this meaningless text here)
I think you're missing the call to bootstrap's javascript library which is needed for the hamburger nav. Try adding this after you add the jquery reference (i.e. <script src="...jquery.min.js"...)
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
For more information, see the Bootstrap documentation page: Getting Started, as well as the updated code snippet below.
<link rel="stylesheet" href= "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity=
"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin=
"anonymous" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" type=
"text/javascript">
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome -->
<script src="https://use.fontawesome.com/926120954b.js" type="text/javascript">
</script>
<!-- My CSS -- >
<link rel="stylesheet" type="text/css" href="mystyle.css">-->
<!--end head: </head> start body:<body>-->
<ul class="nav nav-tabs">
<li role="presentation"><i class="fa fa-home fa-1g" aria-hidden="true"></i></li>
<!-- ****BEGIN THE DROPDOWN TAB-->
<li role="Presentation" class="dropdown-menu">
<a class="Pet" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
Community <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li>item</li>
</ul>
</li>
<!-- ***END THE DROPDOWN TAB -->
<li role="presentation">Pet Help</li>
<li role="presentation">Pets for Sale</li>
<li role="presentation">Pet Services</li>
</ul>

on mobile.changepage external HTML file requiring page refresh

I've been searching the solution for this issue for many days.
1st Splash Page have time out duration then it loads the the home page with list of links. The links are showing but the icons (awesome-icons) are not loading and the transition that i set on each li is not loading as well.
once the page is loaded, if i refresh it all the content with the transition effects are working. I'm using animate.css for list animation.
Can someone figure out the issue?
SPLASH PAGE CODE
<!DOCTYPE html>
<html>
<head>
<title>Splash</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/themes/default/jquery.mobile-1.4.5.min.css">
<link rel="stylesheet" href="_assets/css/jqm-demos.css">
<link rel="stylesheet" href="css/animate.min.css">
<link rel="stylesheet" href="css/myapp.css">
<link rel="shortcut icon" href="favicon.ico">
<script src="js/jquery.js"></script>
<script src="_assets/js/index.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
<script>
$(document).on('pageinit','#splash',function(){
// the .on() method does require jQuery 1.7 + but this will allow you to have the contained code only run when the #splash page is initialized.
setTimeout(function(){
//$.mobile.pageContainer.pagecontainer("change", "home.html", {transition: "animated fadeOut"});
$.mobile.changePage("home.html", "animated fadeOut");
}, 4000);
});
</script>
</head>
<body>
<div data-role="page" id="splash">
<div data-role="content">
<img src="images/uos_logo.svg" alt="startup image" style="width: 100%; height: 100%" />
</div>
</div>
<!-- /page -->
</body>
</html>
HOME PAGE CODE
<!DOCTYPE html>
<html>
<head>
<title>Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/themes/default/jquery.mobile-1.4.5.min.css">
<link rel="stylesheet" href="_assets/css/jqm-demos.css">
<link rel="stylesheet" href="css/myapp.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/animate.min.css">
<link rel="shortcut icon" href="favicon.ico">
<script src="js/jquery.js"></script>
<script src="_assets/js/index.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-role="page" id="home">
<div data-role="content">
<ul id="myTabs" class="animated slideInUp">
<li class="clr1"><i class="fa fa-angle-right"></i> 1</li>
<li class="clr2"><i class="fa fa-angle-right"></i> 2</li>
<li class="clr3"><i class="fa fa-angle-right"></i> 3</li>
<li class="clr4"><i class="fa fa-angle-right"></i> 4</li>
<li class="clr5"><i class="fa fa-angle-right"></i> 5</li>
<li class="clr6"><i class="fa fa-angle-right"></i> 6</li>
<li class="clr7"><i class="fa fa-angle-right"></i> 7</li>
<li class="clr6"><i class="fa fa-angle-right"></i> 8</li>
<li class="clr5"><i class="fa fa-angle-right"></i> 9</li>
<li class="clr4"><i class="fa fa-angle-right"></i> 10</li>
<li class="clr3"><i class="fa fa-angle-right"></i> 11</li>
<li class="clr2"><i class="fa fa-angle-right"></i> 12</li>
<li class="clr1"><i class="fa fa-angle-right"></i> 13</li>
<li class="clr2"><i class="fa fa-angle-right"></i> 14</li>
<li class="clr3"><i class="fa fa-angle-right"></i> 15</li>
<li class="clr4"><i class="fa fa-angle-right"></i> 16</li>
</ul>
</div>
</div>
<!-- /page -->
<script type="text/javascript">
$('ul#myTabs li').each(function(i){
var t = $(this);
setTimeout(function(){ t.addClass('animated slideInUp'); }, (i+1) * 120);
});
</script>
</body>
</html>
By default jQM loads pages into the current DOM via AJAX and only gets the first DIV with data-role="page". So any scripts/css in the second page are not loaded.
As you intention is to completely replace the splash with the first page, you could just use
location.assign("home.html");
If you really want the nice transition, just include the splash page within your first page as a separate data-role="page" div, or include all the scripts from home within the data-role="page" div so they get loaded into the dom.

Hide menu items on mobile bootstrap nav

I've got this nav element on my webpage header:
<div id="categorymenu">
<nav class="subnav">
<ul class="nav-pills categorymenu container">
<li> <a class="home" href="index.php"><span> Home</span></a></li>
<li><a id='info' href='info.php'>Info</a>
<div>
<ul>
<li>About it </li>
<li>How to </li>
</ul>
</div>
</li>
</ul>
</nav>
</div>
I would like to hide the 2 internal <li> elements (the submenu of my menu) when running on mobile.
As mentioned here: Hide one item from menu on mobile I tried to add this class to the 2 <li> elements:
...
<li><a class="dropdown hidden-xs" href="info.php#step1">About it</a> </li>
<li><a class="dropdown hidden-xs" href="info.php#step2">How to</a> </li>
...
but still nothing happens on small devices: the entire menu is always visible.
Any ideas?
Have you tried Media Queries?
http://jsfiddle.net/geargio72/0kb8ecea/
<div id="categorymenu">
<nav class="subnav">
<ul class="nav-pills categorymenu container">
<li> <a class="home" href="index.php"><span> Home</span></a></li>
<li><a id='info' href='info.php'>Info</a>
<div>
<ul class="rowHide">
<li>About it </li>
<li>How to </li>
</ul>
</div>
</li>
</ul>
</nav>
</div>
#media screen and (min-width: 0px) and (max-width: 765px)
{
.rowHide { display: none; }
}
See this it will give you idea...
Without using media query...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="" />
<!-- Le styles -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
<link href="style.css" rel="stylesheet" />
</head>
<body>
<div id="categorymenu">
<nav class="subnav">
<ul class="nav-pills categorymenu container">
<li> <a class="home" href="index.php"><span> Home</span></a>
</li>
<li><a id='info' href='info.php'>Info</a>
<div>
<ul>
<li><a class="hidden-xs" href="info.php#step1">About it</a>
</li>
<li><a class="hidden-xs" href="info.php#step2">How to</a>
</li>
</ul>
</div>
</li>
</ul>
</nav>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.js"></script>
<script src="script.js"></script>
</body>
</html>
The problem was with my PHP HTML/CSS theme. There is a custom.js file that manage the mobile menu.
I post the solution that I've found because I think that's pretty common to use this kinds of PHP HTML/CSS themes.
First of all I add the class for hidden-xs to the anchor element:
<li><a class="hidden-xs" href="info.php#step1">About it</a></li>
<li><a class="hidden-xs" href="info.php#step2">How to</a></li>
Then i changed the custom.js of the theme adding the .not('.hidden-xs') on the row after the // Populate dropdown with menu items comment
// Category Menu mobile
$("<select />").appendTo("nav.subnav");
// Create default option "Go to..."
$("<option />", {
"selected": "selected",
"value" : "",
"text" : "Go to..."
}).appendTo("nav.subnav select");
// Populate dropdown with menu items
$("nav.subnav a[href]").not('.hidden-xs').each(function() {
var el = $(this);
$("<option />", {
"value" : el.attr("href"),
"text" : el.text()
}).appendTo("nav.subnav select");
});
// To make dropdown actually work
// To make more unobtrusive: http://css-tricks.com/4064-unobtrusive-page-changer/
$("nav.subnav select").change(function() {
window.location = $(this).find("option:selected").val();
});

Cannot view any content beneath my header div

I am not sure why I can't view content beneath my navbar.All I get is blank in my in place of the <h1>Hello</h1>. Would appreciate some guidance for this code in particular, but also any resources to learn more about how to avoid this problem in the future.
<!DOCTYPE html>
<html>
<head>
<title>A random title piece.</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="../static/css/bootstrap.css" rel="stylesheet" media="screen">
<link href="../static/style.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container pull-left">
<a class="brand" href="../">Things and Stuff </a>
<div class="nav-collapse collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li class="divider-vertical"></li>
<li>
<form class="form-search">
<div class="input- append">
<input type="text" class="span2 search-query">
<button type="submit" class="btn">
Search
</button>
</div>
</form>
</li>
<li>
<a id="swatch-link" href="../popular">Example 1</a>
</li>
<li>
<a id="swatch-link" href="../sold">Example 2</a>
</li>
<li>
<a id="swatch-link" href="../new">Example 3</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<h1>Hello</h1>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="../static/js/bootstrap.min.js"></script>
<script src="../static/js/json2.js"></script>
</body>
The content is hidden beneath your header .Wrap your content with a div with class container and than let us know .
Here is a jsfiddle
Jsfiddle with padding
<div class=".container">
<h1>Hellow world</h1>
</div>
And add the followingin your css
.container > h1
{
margin-top:70px;
}
Or you can use the following , I suggest using this one :
.container > h1{
padding-top:70px;
}