Search
 
SCRIPT & CODE EXAMPLE
 

CSS

move navbar to right css

<--! credit w3schools -->

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

.topnav {
  overflow: hidden;
  background-color: #333;
}

.topnav a {
  float: left;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.topnav a:hover {
  background-color: #ddd;
  color: black;
}

.topnav a.active {
  background-color: #04AA6D;
  color: white;
}

.topnav-right {
  float: right;
}
</style>
</head>
<body>

<div class="topnav">
  <a class="active" href="#home">Home</a>
  <a href="#news">News</a>
  <a href="#contact">Contact</a>
  <div class="topnav-right">
    <a href="#search">Search</a>
    <a href="#about">About</a>
  </div>
</div>

<div style="padding-left:16px">
  <h2>Top Navigation with Right Aligned Links</h2>
  <p>Some content..</p>
</div>

</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Css :: how to disable css-select select box 
Css :: responsive website css 
Css :: sass folder structure 
Css :: remove or hide powered by text from Google Translate 
Css :: css custom scrollbar 
Css :: animate progress tag css 
Css :: background blur css 
Css :: css example 
Css :: javafx button padding css 
Css :: Input with File type css override 
Css :: inline pseudo element 
Css :: css hide scrollbar but scrollable 
Css :: css move element to the right 
Css :: what is a max and min width media query 
Css :: box shadow all sides 
Css :: line height tailwind 
Css :: mb in bootstrap 
Css :: flex wrap tailwind 
Css :: use CSS to add a bullet point 
Css :: how to remove default padding of div 
Css :: css if select has value 
Css :: increase space between dashed border css 
Css :: use dark shed in image in css 
Css :: css line height 
Css :: css nth child range 
Css :: text shadow in css 
Css :: change parent div css on over of child 
Css :: css linear gradients 
Css :: how to get text to auto break in a grid 
Css :: what is universal selector 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =