I'm trying to get the logo and the nav bar links on the same line. The logo will appear by itself when it resizes to mobile.
This is the current:
Currently on two lines.
This is the html behind it:
<!-- header Area Start-->
<div class="header-area">
<div class="container">
<div class="row">
<div class="col-lg-2 col-md-3 col-12">
<div class="logo">
<a href="index-2.html">
<img src="assets/img/logo.png" alt="">
</a>
</div>
</div>
<div class="col-lg-10 text-right col-md-9 col-12">
<div class="responsive_menu"></div>
<div class="mainmenu-area">
<ul id="nav">
<li>Home <i class="fa fa-angle-down"></i>
<ul class="drop-menu">
<li>Rocket Home </li>
<li>Gradient Home </li>
</ul>
</li>
<li>Domain</li>
<li>Hosting <i class="fa fa-angle-down"></i>
<ul class="drop-menu">
<li>Hosting </li>
<li>Team </li>
<li>About us</li>
<li>Testimonial</li>
<li>FAQ</li>
</ul>
</li>
<li>Pages <i class="fa fa-angle-down"></i>
<ul class="drop-menu">
<li>Team </li>
<li>About us</li>
<li>Testimonial</li>
<li>FAQ</li>
<li>Service</li>
<li>Blog Details</li>
<li>404 Page</li>
<li>Coming Soon</li>
</ul>
</li>
<li>Blog</li>
<li>Support</li>
</ul>
</div>
<div class="search">
<span class="search-trigger"><i class="fa fa-search"></i></span>
<div class="search-box">
<form action="#">
<input type="text" name="s" placeholder="Search..">
<div class="submit-btn">
<input type="submit" value="Go">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- header Area end-->
Any suggestions on what I can do to make them all on one line?
Maximum size of the column in bootstrap is 12. Bootstrap adds padding and margin by default, so try using col-lg-8 and see what happens.
<div class="header-area">
<div class="container">
<div class="row">
<div class="col-lg-2 col-md-3">
<div class="logo">
<a href="index-2.html">
<img src="assets/img/logo.png" alt="">
</a>
</div>
</div>
<div class="col-lg-8 text-right col-md-9">
<div class="responsive_menu"></div>
<div class="mainmenu-area">
Related
I'm trying to get this design out, but it just didn't work out. Where do I make mistakes? how can I do that? Can you please help me.
I couldn't write much as CSS. I haven't even gotten the footer part right in the Middle yet.
this is my codes:
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<footer>
<div class="container">
<div class="row no-gutters">
<div class="col-lg-2 footer-left ml-auto">
<p class="more-info-title">more info</p>
<ul class="footer-left-info ">
<li>about us</li>
<li>delivery info</li>
<li>FAQs</li>
<li>terms and conditions</li>
<li>privacy policy</li>
<li>rydale jobs</li>
<li>sitemap</li>
</ul>
</div>
<div class="col-lg-2 footer-center mx-auto">
dave smith
</div>
<div class="col-lg-2 footer-right mx-auto">
<p class="find-us-title">find us</p>
<ul class="footer-right-info">
<li>
<a href="#">
<i class="fas fa-map-marker-alt"></i> rydale stockists
</a>
</li>
<li>
<a href="#">
<i class="fas fa-phone-alt"></i> shows & events
</a>
</li>
<li>
<a href="#">
<i class="far fa-envelope"></i> 01377 337160
</a>
</li>
<li>
<a href="#">
<i class="fas fa-map-marker-alt"></i> contact us
</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
Use the order-N to reorganize the columsn on smartphone, for example
<footer>
<div class="container">
<div class="row no-gutters">
<div class="col-6 col-lg-3 order-2 order-lg-1 text-center">
<p><br><br>LEFT<br><br></p>
</div>
<div class="col-12 col-lg-6 order-1 order-lg-1 text-center">
<p><br><br>MIDDLE<br><br></p>
</div>
<div class="col-6 col-lg-3 order-2 order-lg-1 text-center">
<p><br><br>RIGHT<br><br></p>
</div>
</div>
</div>
</footer>
I have materialize.min.css included already and everything else on the page is working.
But when I try the dropdown nothing seems to happen. Any help would be appreciated.
The dropdown I am trying to show is dropdown1. First li in nav-content. I tried as you can see to put the dropdown below origin but it did not help.
<li>one</li>
<li>two</li>
<li class="divider"></li>
<li>three</li>
</ul>
<nav class="nav-extended">
<div class="nav-wrapper">
ASite
<i class="material-icons">menu</i>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li>
<form>
<div class="input-field">
<input id="search" type="search" required>
<label for="search"><i class="material-icons">search</i></label>
<i class="material-icons">close</i>
</div>
</form>
</li>
<li><a class="waves-effect waves-light btn">Register</a></li>
<li><a class="waves-effect waves-light btn">Login</a></li>
</ul>
</div>
<div class="nav-content">
<ul class="tabs tabs-transparent">
<li class="tab"><a class='dropdown-button' href='#' data-activates='dropdown1' data-beloworigin='true'>Drop Me!</a></li>
<li class="tab"><a class="active" href="#test2">Test 2</a></li>
<li class="tab">Disabled Tab</li>
<li class="tab">Test 4</li>
</ul>
</div>
</nav>
<ul class="sidenav" id="mobile-demo">
<li>Sass</li>
<li>Components</li>
<li>JavaScript</li>
</ul>
<div id="test1" class="col s12">Test 1</div>
<div id="test2" class="col s12">Test 2</div>
<div id="test3" class="col s12">Test 3</div>
<div id="test4" class="col s12">Test 4</div>
You must need to include .js file also before ending tag of body. Copy following tag and place it before end tag of body.
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
So guys my questions says I am trying to make 4 DIV's being in the same line/row however.
Product Company (middle) Languages DIV4
text... text... text... text...
text... text... text... text...
it should look something like that... .I hope you do understand what i mean!
so this is my code: `
<div class="container">
<div class="row">
<div class="col-md-4">
<h2>Product</h2>
<li> Templates</li>
<li> Pricing</li>
</div>
<div class="col-md-4">
<h2>Company</h2>
<li>About Us</li>
<li>Contact us</li>
<li>Terms of Servise</li>
<li>Privacy policy</li>
</div>
<div class="col-md-4">
<h2>Language</h2>
<li>Englisch</li>
<li>German</li>
<li>Srpski</li>
</div>
<div class="col-md-4">
<li>facebook</li>
<li>kaaa</li>
<li>kaaa</li>
</div>
</div>
</div>
First make sure that your markup is valid. E.g. for your li tags the ul tag was missing.
If you want to display 4 divs, you need the class col-md-3 instead of col-md-4. Bootstrap is using a grid system with a default column count of 12. If you need 4 columns you have to use 12/4 = 3 meaning col-md-3.
The md stands for medium. So for small devices, the columns break and are displayed on top of each other. Watch the following example in fullscreen, to see the columns standing next to each other.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-md-3">
<h2>Product</h2>
<ul>
<li> Templates</li>
<li> Pricing</li>
</ul>
</div>
<div class="col-md-3">
<h2>Company</h2>
<ul>
<li>About Us</li>
<li>Contact us</li>
<li>Terms of Servise</li>
<li>Privacy policy</li>
</ul>
</div>
<div class="col-md-3">
<h2>Language</h2>
<ul>
<li>Englisch</li>
<li>German</li>
<li>Srpski</li>
</ul>
</div>
<div class="col-md-3">
<ul>
<li>facebook</li>
<li>kaaa</li>
<li>kaaa</li>
</ul>
</div>
</div>
</div>
Could be a screen size issue and also sytax issue
Bootstrap only allows 12 columns per row, so each column needs "width" of 3, col-md-3
Then since the size is set to md the columns widths are set up for a medium size screen
With col-xs-3 it will make the columns as small as they can go without overflowing to the next row
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col-md-3 col-xs-3">
<h2>Product</h2>
<ul>
<li> Templates
</li>
<li> Pricing
</li>
</ul>
</div>
<div class="col-md-3 col-xs-3">
<h2>Company</h2>
<ul>
<li>About Us
</li>
<li>Contact us
</li>
<li>Terms of Servise
</li>
<li>Privacy policy
</li>
</ul>
</div>
<div class="col-md-3 col-xs-3">
<h2>Language</h2>
<ul>
<li>Englisch
</li>
<li>German
</li>
<li>Srpski
</li>
</ul>
</div>
<div class="col-md-3 col-xs-3">
<h2>Share</h2>
<ul>
<li>facebook
</li>
<li>kaaa
</li>
<li>kaaa
</li>
</ul>
</div>
</div>
</div>
check this snippet
.row {
display: flex;
}
<div class="container">
<div class="row">
<div class="col-md-4">
<h2>Product</h2>
<ul>
<li> Templates
</li>
<li> Pricing
</li>
</ul>
</div>
<div class="col-md-4">
<h2>Company</h2>
<ul>
<li>About Us
</li>
<li>Contact us
</li>
<li>Terms of Servise
</li>
<li>Privacy policy
</li>
</ul>
</div>
<div class="col-md-4">
<h2>Language</h2>
<ul>
<li>Englisch
</li>
<li>German
</li>
<li>Srpski
</li>
</ul>
</div>
<div class="col-md-4">
<h2>div4</h2>
<ul>
<li>facebook
</li>
<li>kaaa
</li>
<li>kaaa
</li>
</ul>
</div>
</div>
</div>
Hope this helps
Good morning folks, this is only my 2nd question on here, so please bear with me and my minimums:
I just wrote up this lengthy message of how I put the ID and class commands in a section instead of a container, and why the section all the sudden overwrote my css height style. I then figured why not replace the # with a . in the CSS file, and voila, it worked again.
However, i know have a new problem. I have a fixed-top bootstrap navigation bar, and when i click on section #2, named Intro, the page scrolls down only a few pixels to display the first line of text. What i had intended was for the site to display the entire intro container. Any suggestions?
I hope this makes sense:
<body id="page-top">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container" id="navigation">
<div class="row">
<ul class="nav navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#page-top">Home</a>
</li>
</ul>
<ul class="nav navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#intro">Intro</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><span class="glyphicon glyphicon-user"></span> Sign Up</li>
<li><span class="glyphicon glyphicon-log-in"></span> Login</li>
</ul>
</div>
</div>
</nav>
<section id="intro" class="intro-section">
<div class="container">
<div class="row">
<div class="col-md-10 col-md-push-1">
<h1>Welcome to TestZat</h1>
Lorem....
</div>
</div>
</div>
</section>
<section id="login" class="login-section">
<div class="container">
<div class="row">
<div class="col-md-10 col-md-push-1">
<h1>Finde das Login script hier</h1>
</div>
</div>
</div>
</section>
<section id="contact" class="contact-section">
<div class="container" id="contact-section">
<div class="row">
<div class="col-md-10 col-md-push-1" id="contact">
Section content TBD
</div>
</div>
</div>
</section>
Now it will work fine...just remove id from container.
<body id="page-top">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div id="navigation">
<div class="row">
<ul class="nav navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#page-top">Home</a>
</li>
</ul>
<ul class="nav navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#intro">Intro</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><span class="glyphicon glyphicon-user"></span> Sign Up</li>
<li><span class="glyphicon glyphicon-log-in"></span> Login</li>
</ul>
</div>
</div>
</div>
</nav>
<section id="intro" class="intro-section">
<div class="container">
<div class="row">
<div class="col-md-10 col-md-push-1">
<h1>Welcome to TestZat</h1>
Lorem....
</div>
</div>
</div>
</section>
<section id="login" class="login-section">
<div class="container">
<div class="row">
<div class="col-md-10 col-md-push-1">
<h1>Finde das Login script hier</h1>
</div>
</div>
</div>
</section>
<section id="contact" class="contact-section">
<div class="container" id="contact-section">
<div class="row">
<div class="col-md-10 col-md-push-1" id="contact">
Section content TBD
</div>
</div>
</div>
</section>
I use foundation 6 to build my website. Only a problem occurs when I shrink the size of my window.
Picture of my website
Does somebody know how to fix this?
An answer is appreciated.
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><a href="#"><b>Pimg</b>
</a>
</h1>
</li>
<!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
<li class="toggle-topbar menu-icon"><span>Menu</span></li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li> <div class="entypo-home entipo"></div></li>
<li> <div class="entypo-picture entipo"></div></li>
<li> <div class="entypo-upload entipo"></div></li>
<li> <div class="entypo-user entipo"></div></li>
</ul>
<ul class="left">
<li>Log out</li>
<li class="has-form">
<div class="row collapse">
<div class="medium-8 columns">
<input type="text" placeholder="Search...">
</div>
<div class="medium-4 columns">
Search
</div>
</div>
</li>
</ul>
</section>
</nav>