Adding a Horizontal Navigation Bar - Using Confluence 3.1

Hello all,

I am the wiki admin for our department. I wouldn't consider myself an expert user by any means, but can code basic stuff. I am trying to create a black horiztional navigation bar, which contains our company logo to the left, and followed by 3-4 hyperlinked labels. I've tried inserting several different kinds of code, either that I've trolled "help pages" on the web for, of created through my WSYSIWYG editor (EvrSoft). I either am entering the code incorrectly, or, there is a permissions restriction prohibiting me from using these macros (missing plug-ins?), or very possibly something else entirely.

Here is the code I pasted:

<head>
<style type="text/css">
<\!-\-

\#navbar ul {
margin: 0;
padding: 5px;
list-style-type: none;
text-align: center;
background-color: #000;
}
\#navbar ul li {
display: inline;
}
\#navbar ul li a {
text-decoration: none;
padding: .2em 1em;
color: #fff;
background-color: #000;
}
\#navbar ul li a:hover {
color: #000;
background-color: #fff;
}
\-->
</style>
</head>
<body>
<div id="navbar">
<ul>
<li><a href="#"><img src="..///192.168.20.50/home/amccarty/Sales Ops/Wiki Docs/Images/tRP Logo.jpg" width="160" height="49" alt="" border="0" /></a></li>
<li><a href="#">New Documents</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Table of Contents</a></li>
<li><a href="#">Search</a></li>

And I get the following errors in Preview mode:

Thanks for any help you can provide.

Cheers,

Amber

2 answers

1 accepted

Amber,

You may not be aware that the markup for Confluence versions less than 4.0 (the latest) is a special format that is not HTML/CSS. Version 4.0 uses XHTML, but it is not user editable. There is an add-in macro to allow insertion of HTML code but with the errors you got, I would assume you are not using it.

For you to get what you seek, you are likely going to have make use of an add-in.

When you are editing a page, in the Wiki markup mode, their is a right margin listing of some of the basics and a link therein to the full listing of markup.

You might try something like this:

{panel:bgColor=gray50|borderColor=black}| {color:white}[New Documents]{color} | {color:white}[Contact Us]{color} | !http://www.azsos.gov/Images/State_Symbols/american_flag.gif|width=50! | {color:white}[Table of Contents]{color} | {color:white}[Search]{color} |{panel}

This is a great work around thanks for suggesting. :)

Any idea how to expand the length of the black bar (about 1/2 inch on each side), or does it default to center, fit to screen? Also the table outline is white, but I've tried changing it to black, but it still appears white?

Most Appreciative,

Amber

This takes care of a few of the items. I haven't been able to determine how to change the table internal border colors:

{panel:bgColor=gray70|borderColor=black}
{table-plus:width=100%|borderColor=gray|fgColor=white|bgColor=gray| 
columnAttributes=style="text-align:center;width:22%",style="text-align:center;width:22%",style="text-align:center;width:12%",style="text-align:center;width:22%",style="text-align:center;width:22%}
| {color:white}[New Documents]{color} | {color:white}[Contact Us]{color} | !http://www.azsos.gov/Images/State_Symbols/american_flag.gif|width=50! | {color:white}[Table of Contents]{color} | {color:white}[Search]{color} |
{table-plus}
{panel}

Where are you trying to put this navbar? Looks like you've put it someplace where the wiki renderer is trying to render it, which you don't want.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

666 views 21 11
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you