Adding a Horizontal Navigation Bar - Using Confluence 3.1

Amber McCarty October 5, 2011

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

0 votes
Answer accepted
Kevin Buchs
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2011

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.

Kevin Buchs
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2011

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}

Amber McCarty October 6, 2011

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

Kevin Buchs
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2011

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}

0 votes
Laura Kolker
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2011

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
TAGS
AUG Leaders

Atlassian Community Events