logo
down
shadow

Bootstrap Navbar elements not aligned properly


Bootstrap Navbar elements not aligned properly

Content Index :

Bootstrap Navbar elements not aligned properly
Tag : html , By : Brian Drum
Date : November 24 2020, 05:49 AM

This might help you This is one of the minor CSS problems that plagues me constantly! I'm trying to align navigation elements in my navbar, which contain some images and text, I tried this part of code but it's not working properly :
<a href="#" class="nav-link nav-link--menu">
      MENU

    <div class="menu-icon-wrapper">
        <div class="menu-icon"></div>
        <div class="menu-icon"></div>
    </div>
</a>

.nav-link--menu {

     // add these to align your menu link correctly:
     display: flex;
     align-items: center;
}

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Bootstrap 3 Navbar elements not aligned properly


Tag : javascript , By : vferman
Date : March 29 2020, 07:55 AM
wish of those help Try to use float: right; on both .nav and .navbar.
For additional adjusting on a vertical basis, you can use clear: both; on .nav. If it still does nothing, add !important at the end of the float statement. A Simple CSS solution for your problem!

Tag : html , By : somebody
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , There are a few issues. Bootstrap adds 10px bottom margin to ul. You can remove that bottom margin and use line-height to vertically align li inside ul See this code snippet:
body {
	background-color: #FFF;
}

#pageHeaderTop {
	background-color: #FFFFFF;
	width:100%;
	border-bottom-style: solid;
    border-width: 1px;
	border-color: #D1D1D1;
	height: auto;
}

#pageHeaderBottom {
	background-color: #D1D1D1;
	width:100%;
	border-top-style: solid;
    border-width: 1px;
	border-color: #FFFFFF;
}

.logoHeader {
	width: 1200px;
	text-align: left;
	padding: 20px;
}

.nav {
	width: 1200px;
    height: 30px;
}

.nav a {
	color: #5A5A5A;
    font-size: 11px;
    font-weight: bold;
	/* 10px top & bottom 14px left and right*/
    padding: 10px 14px;
    text-transform: uppercase;
}

.nav-ul {
  margin-bottom: 0;
}

.nav li {
  display: inline-block;
  height: 30px;
  line-height: 30px;
}

#pageContent {
	border:#999 1px solid;
	border-top: none;
	background-color:#F4F4F4;
	width:1200px;
}

.contentArea {
	text-align: left;
	margin-left: 24px;
}

#pageFooter {
	border:#999 1px solid;
	border-top: none;
	background-color:#F4F4F4;
	width:1200px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
  	<title>Rapid Codes - Get It Now!</title>
    <link href="style/bootstrap.css" rel="stylesheet">
    <link href="style/style.css" rel="stylesheet">
  
<body>

<div align="center" id="mainWrapper">
    <div id="pageHeaderTop">
	<div class="logoHeader">
    	<img src="http://www.rapidcodes.co.uk/style/NewLogo.png" width="400" height="50" alt="Logo"/>
    </div>
</div>
<div id="pageHeaderBottom">
    <div class="nav">
        <ul class="pull-left nav-ul">
         	<li><a href="http://rapidcodes.co.uk">Home</a></li>
            <li><a href="xbox.php">Xbox</a></li>
            <li><a href="playstation.php">PlayStation</a></li>
         </ul>
         <ul class="pull-right">
            <li><a href="contact_us.php">Contact Us</a></li>
         </ul>
     </div>
</div>
    
  <div id="pageContent">
  <div class="contentArea">Test</div></div>

    <div id="pageFooter">© 2015 Rapid Codes</div>
    
</div>

</body>
</html>

bootstrap navbar not aligned properly


Tag : css , By : anon
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further I'm running a site navrcholu.cz on latest wordpress and bootstrap. However my navbar is not displayed correctly expecially on tablets. It should be always like 30px from the top of the page. On desktop PC with FF or Chrome looks OK. Here is navbar code: , Based on your question, I'd modify the CSS like this:
nav
{
   position: fixed;
   top: 0px;
}

Bootstrap collapsed navbar - I want menu to be aligned to left but it is aligned to right


Tag : html , By : Andrew Mattie
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Use a media query with your CSS so it doesn't change the mobile view.
Working Example:
@media (min-width: 768px) {
  .nav {
    margin-left: 212px;
  }
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />

<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  <div class="container-fluid">

    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>

      <a href="#" class="navbar-left logo">
        <img src="http://placehold.it/50x50/f00/fff" height="50px">
      </a>

      <a class="navbar-brand text-hide" href="#">title</a>
    </div>

    <div class="collapse navbar-collapse" id="menu">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Bio</a>
        </li>
        <li><a href="#">Portfolio</a>
        </li>
        <li><a href="#">Freebies</a>
        </li>
      </ul>
    </div>

  </div>
</nav>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

Bootstrap navbar icons not aligned properly


Tag : html , By : Robert Daniel Pickar
Date : March 29 2020, 07:55 AM
hope this fix your issue On the ul element change the class to just nav instead of navbar-nav & add class d-flex
    <nav class="navbar navbar-dark bg-dark">
      <a class="navbar-brand" href="#">Navbar</a>
      <ul class="nav d-flex">
        <li class="nav-item">
          <a class="nav-link p-2" href="#">
            <img src="node_modules/bootstrap-icons/icons/search.svg" alt="" />
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link p-2" href="#">
            <img src="node_modules/bootstrap-icons/icons/bell.svg" alt="" />
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link p-2" href="#">
            <img src="node_modules/bootstrap-icons/icons/person.svg" alt="" />
          </a>
        </li>
      </ul>
    </nav>
Related Posts Related QUESTIONS :
  • How do I display TypeScript code in "<code>" tags in an Angular app?
  • How can I change the color of input tag in a form when focusing on it?
  • How do I put a container in a fixed position with its own overflow?
  • How to fix text-alignment
  • Outlook not displaying a portion of HTML
  • Remove radio button text only with CSS
  • How to use "v-if" in Vue.js to render a <span> only if parent div has a specific property?
  • How to Extract just the Date from Angular Material Datepicker
  • @keyframes not working, I have tried everything i can think of
  • Bootstrap fix form to bottom of the page
  • How to hide a list element in html
  • How to stop repeating image
  • How do I prevent the GET method from encoding HTML special characters in the URI?
  • CSS/HTML: How do I change the color of the check mark within the checkbox input?
  • attaching a file path in a html form
  • Flip <canvas> (rotate 180deg) after being published on page
  • Is there an application I can show a client the speed of their site via differring internet connections?
  • Html / Email / Distribution list problem from a noob
  • Inspiring web experiments and technical demos
  • Can I load javascript code using <link> tag?
  • Lisp-style quotation in HTML
  • How to put text float around image like some newspapers' format using CSS?
  • Technical reasons for not having large background images in websites
  • HTML 5 Structure tags demo
  • Angular - String interpolation of undefined variable
  • Is there any way to edit specific Column of table using mat-table in Angular material
  • How can I set a text as a shadow for a heading element?
  • How to fix the forms making the buttons overlap
  • Splitting XML into multiple HTML pages with XSLT?
  • How to justify empty divs in flex container
  • How to blur in CSS only one layer of when you have multiple layers in background-image?
  • Scrollable html table with fixed first row and first column, along with angular material controls within the cells of ta
  • In Django, how to extract ID attribute from html Input tag, WITHOUT using django forms
  • how to fix link tag in html after changing css
  • How do I add a top padding to the second row?
  • Is it possible to split XML into multiple HTML pages with page navigation?
  • AngularJS: responsive height in bootstrap
  • Hide second line of text with CSS
  • repeating-linear-gradient not working in Edge browser and internet Explorer Browser
  • how to make search and form category merges like amazon on bootstrap
  • Bootstrap: Rearranging rows into columns and changing the order of elements
  • How can I move a label under a text box?
  • How save LinearGradient To database
  • How to reposition an image with a linear gradient using css?
  • HTML audio will not play when page opened by batch file
  • CSS Three Tone Diagonal Background
  • How to use slots inside of template components in HTML
  • Using span tags in meta description & title, for dual languages
  • How to make an icon/span selectable by pressing Tab key?
  • Add dynamic margins using UI Kit
  • Add margin-top to textbox
  • What is the correct semantic HTML markup for a title (book, movie, etc.), according to the spec? Is it an <em> tag
  • How to make an animation in Geoserver or in Leaflet
  • Buttons overlapping when shrinking window
  • Stretch an element to the end of the automatically calculated grid, not just the explicit grid
  • What relation is there between Angular's <ng-content> and ShadowDOM
  • CSS background for div element is not working
  • CSS Marquee: multiple paragraphs overlaps
  • I want to align search bar to extreme right
  • Getting blank white space to the left of content inside pre tags
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com