Navbar brand on the left side. Navbar on the right
I try to position the navbar branding on the left side change the font and size and it should be a clickable text and navigation on the right. i tried to add a div or class id and i can't get it to work.
I tried to put it in li but i don't know if this makes a difference since i need to class the right navbar so i can actively style it.
html {
max-width: 1024px;
min-width: 320px;
}
body {
max-width: 1024px;
min-width: 320px;
margin-left: auto;
margin-right: auto;
font-family: arial;
}
/*Navbar*/
/* Add a black background color to the top navigation */
.logo {
padding-top: 10px;
}
.topnav {
padding-top: 10px;
padding-bottom: 10px;
}
/* Style the links inside the navigation bar */
.topnav a {
font-family: 'Roboto Condensed', sans-serif;
list-style-type: none;
text-align: center;
display: inline;
font-size: 17px;
text-decoration: none;
color: #1d1d1d;
padding: 10px;
}
/* Change the color of links on hover */
.topnav a:hover {
color: red;
}
/* Add a color to the active/current link */
.topnav a.active {
color: red;
}
/* Right-aligned section inside the top navigation */
.topnav-right {
float: right;
}
/*Navbar end*/
<body>
<!--Header-->
<header>
<!--Logo-->
<div class="topnav">
<div class="topnav-right">
<a href="selectTopic?html" class="topic">HTML 5</a>
<a class="active" href="#home">Home</a>
<a href="#search">Blog</a>
<a href="#search">About</a>
<a href="#search">FAQ</a>
<a href="#about">Contact</a>
</div>
</div>
</div>
</header>
html css navbar branding
add a comment |
I try to position the navbar branding on the left side change the font and size and it should be a clickable text and navigation on the right. i tried to add a div or class id and i can't get it to work.
I tried to put it in li but i don't know if this makes a difference since i need to class the right navbar so i can actively style it.
html {
max-width: 1024px;
min-width: 320px;
}
body {
max-width: 1024px;
min-width: 320px;
margin-left: auto;
margin-right: auto;
font-family: arial;
}
/*Navbar*/
/* Add a black background color to the top navigation */
.logo {
padding-top: 10px;
}
.topnav {
padding-top: 10px;
padding-bottom: 10px;
}
/* Style the links inside the navigation bar */
.topnav a {
font-family: 'Roboto Condensed', sans-serif;
list-style-type: none;
text-align: center;
display: inline;
font-size: 17px;
text-decoration: none;
color: #1d1d1d;
padding: 10px;
}
/* Change the color of links on hover */
.topnav a:hover {
color: red;
}
/* Add a color to the active/current link */
.topnav a.active {
color: red;
}
/* Right-aligned section inside the top navigation */
.topnav-right {
float: right;
}
/*Navbar end*/
<body>
<!--Header-->
<header>
<!--Logo-->
<div class="topnav">
<div class="topnav-right">
<a href="selectTopic?html" class="topic">HTML 5</a>
<a class="active" href="#home">Home</a>
<a href="#search">Blog</a>
<a href="#search">About</a>
<a href="#search">FAQ</a>
<a href="#about">Contact</a>
</div>
</div>
</div>
</header>
html css navbar branding
Hello Johnwong, where is the code for your Logo? I see that you've created a class for it, but no HTML.
– Robert Perez
Nov 22 '18 at 7:40
add a comment |
I try to position the navbar branding on the left side change the font and size and it should be a clickable text and navigation on the right. i tried to add a div or class id and i can't get it to work.
I tried to put it in li but i don't know if this makes a difference since i need to class the right navbar so i can actively style it.
html {
max-width: 1024px;
min-width: 320px;
}
body {
max-width: 1024px;
min-width: 320px;
margin-left: auto;
margin-right: auto;
font-family: arial;
}
/*Navbar*/
/* Add a black background color to the top navigation */
.logo {
padding-top: 10px;
}
.topnav {
padding-top: 10px;
padding-bottom: 10px;
}
/* Style the links inside the navigation bar */
.topnav a {
font-family: 'Roboto Condensed', sans-serif;
list-style-type: none;
text-align: center;
display: inline;
font-size: 17px;
text-decoration: none;
color: #1d1d1d;
padding: 10px;
}
/* Change the color of links on hover */
.topnav a:hover {
color: red;
}
/* Add a color to the active/current link */
.topnav a.active {
color: red;
}
/* Right-aligned section inside the top navigation */
.topnav-right {
float: right;
}
/*Navbar end*/
<body>
<!--Header-->
<header>
<!--Logo-->
<div class="topnav">
<div class="topnav-right">
<a href="selectTopic?html" class="topic">HTML 5</a>
<a class="active" href="#home">Home</a>
<a href="#search">Blog</a>
<a href="#search">About</a>
<a href="#search">FAQ</a>
<a href="#about">Contact</a>
</div>
</div>
</div>
</header>
html css navbar branding
I try to position the navbar branding on the left side change the font and size and it should be a clickable text and navigation on the right. i tried to add a div or class id and i can't get it to work.
I tried to put it in li but i don't know if this makes a difference since i need to class the right navbar so i can actively style it.
html {
max-width: 1024px;
min-width: 320px;
}
body {
max-width: 1024px;
min-width: 320px;
margin-left: auto;
margin-right: auto;
font-family: arial;
}
/*Navbar*/
/* Add a black background color to the top navigation */
.logo {
padding-top: 10px;
}
.topnav {
padding-top: 10px;
padding-bottom: 10px;
}
/* Style the links inside the navigation bar */
.topnav a {
font-family: 'Roboto Condensed', sans-serif;
list-style-type: none;
text-align: center;
display: inline;
font-size: 17px;
text-decoration: none;
color: #1d1d1d;
padding: 10px;
}
/* Change the color of links on hover */
.topnav a:hover {
color: red;
}
/* Add a color to the active/current link */
.topnav a.active {
color: red;
}
/* Right-aligned section inside the top navigation */
.topnav-right {
float: right;
}
/*Navbar end*/
<body>
<!--Header-->
<header>
<!--Logo-->
<div class="topnav">
<div class="topnav-right">
<a href="selectTopic?html" class="topic">HTML 5</a>
<a class="active" href="#home">Home</a>
<a href="#search">Blog</a>
<a href="#search">About</a>
<a href="#search">FAQ</a>
<a href="#about">Contact</a>
</div>
</div>
</div>
</header>
html {
max-width: 1024px;
min-width: 320px;
}
body {
max-width: 1024px;
min-width: 320px;
margin-left: auto;
margin-right: auto;
font-family: arial;
}
/*Navbar*/
/* Add a black background color to the top navigation */
.logo {
padding-top: 10px;
}
.topnav {
padding-top: 10px;
padding-bottom: 10px;
}
/* Style the links inside the navigation bar */
.topnav a {
font-family: 'Roboto Condensed', sans-serif;
list-style-type: none;
text-align: center;
display: inline;
font-size: 17px;
text-decoration: none;
color: #1d1d1d;
padding: 10px;
}
/* Change the color of links on hover */
.topnav a:hover {
color: red;
}
/* Add a color to the active/current link */
.topnav a.active {
color: red;
}
/* Right-aligned section inside the top navigation */
.topnav-right {
float: right;
}
/*Navbar end*/
<body>
<!--Header-->
<header>
<!--Logo-->
<div class="topnav">
<div class="topnav-right">
<a href="selectTopic?html" class="topic">HTML 5</a>
<a class="active" href="#home">Home</a>
<a href="#search">Blog</a>
<a href="#search">About</a>
<a href="#search">FAQ</a>
<a href="#about">Contact</a>
</div>
</div>
</div>
</header>
html {
max-width: 1024px;
min-width: 320px;
}
body {
max-width: 1024px;
min-width: 320px;
margin-left: auto;
margin-right: auto;
font-family: arial;
}
/*Navbar*/
/* Add a black background color to the top navigation */
.logo {
padding-top: 10px;
}
.topnav {
padding-top: 10px;
padding-bottom: 10px;
}
/* Style the links inside the navigation bar */
.topnav a {
font-family: 'Roboto Condensed', sans-serif;
list-style-type: none;
text-align: center;
display: inline;
font-size: 17px;
text-decoration: none;
color: #1d1d1d;
padding: 10px;
}
/* Change the color of links on hover */
.topnav a:hover {
color: red;
}
/* Add a color to the active/current link */
.topnav a.active {
color: red;
}
/* Right-aligned section inside the top navigation */
.topnav-right {
float: right;
}
/*Navbar end*/
<body>
<!--Header-->
<header>
<!--Logo-->
<div class="topnav">
<div class="topnav-right">
<a href="selectTopic?html" class="topic">HTML 5</a>
<a class="active" href="#home">Home</a>
<a href="#search">Blog</a>
<a href="#search">About</a>
<a href="#search">FAQ</a>
<a href="#about">Contact</a>
</div>
</div>
</div>
</header>
html css navbar branding
html css navbar branding
asked Nov 22 '18 at 1:05
JohnwongJohnwong
1
1
Hello Johnwong, where is the code for your Logo? I see that you've created a class for it, but no HTML.
– Robert Perez
Nov 22 '18 at 7:40
add a comment |
Hello Johnwong, where is the code for your Logo? I see that you've created a class for it, but no HTML.
– Robert Perez
Nov 22 '18 at 7:40
Hello Johnwong, where is the code for your Logo? I see that you've created a class for it, but no HTML.
– Robert Perez
Nov 22 '18 at 7:40
Hello Johnwong, where is the code for your Logo? I see that you've created a class for it, but no HTML.
– Robert Perez
Nov 22 '18 at 7:40
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422557%2fnavbar-brand-on-the-left-side-navbar-on-the-right%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422557%2fnavbar-brand-on-the-left-side-navbar-on-the-right%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hello Johnwong, where is the code for your Logo? I see that you've created a class for it, but no HTML.
– Robert Perez
Nov 22 '18 at 7:40