Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-10 01:12:34

Mithrus
New Member
From: Canada
Registered: 2008-02-08
Posts: 5
Website

Adding a Navbar

I’m trying to put in a navbar for the important links so I can free up space in the two sidebars. What I’ve done so far is this:

Code in the default CSS:
<code>

#navbar
{

margin-left: -10px;
}

#navbar a
{

text-align: right;

font-family: Arial, san-serif;

font-color: #CC1100;

font-size: 0.95em;;
}

</code>

Code in the page template:
<code>

<div id=“navbar”>

<a href=“http://www.irisshot.com/”>home</a>

</div>

</code>

However, if you go to my site (www.irisshot.com), you’ll see that the first link I’ve added in doesn’t sit inside the blue test navbar I’ve put up, and it doesn’t follow any of the CSS I’ve set for it. I’ve looked throughout the coding at how other links are set up, and I don’t see anything wrong with what I’ve done. The only part I think that would be a problem is the way I have it coded in the page template, with the link sitting inside the div with the image for the navbar itelf.

So, what exactly do I need to do to fix it? Should the image for the navbar be in the CSS instead?

Any help is greatly appreciated.

Last edited by Mithrus (2008-02-10 01:49:42)

Offline

#2 2008-02-10 01:34:01

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Adding a Navbar

Mithrus wrote:

Should the image for the navbar be in the CSS instead?

Yep. Add either background: url(/images/navbar.jpg); or background-color: #whateverthecolouris; to #navbar, and remove the image from the page template. The way you have it now the text will always come after the image.

Offline

#3 2008-02-10 01:54:51

Mithrus
New Member
From: Canada
Registered: 2008-02-08
Posts: 5
Website

Re: Adding a Navbar

All right, so I did that, however, the CSS still isn’t being followed. Not exactly sure why that would be, though.

Offline

#4 2008-02-10 02:33:19

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Adding a Navbar

text-align: right; belongs in #navbar, not in #navbar a.

If you’re using Firefox, use the Web Developer extension and find some CSS tutorials :)

Offline

#5 2008-02-10 22:45:58

Mithrus
New Member
From: Canada
Registered: 2008-02-08
Posts: 5
Website

Re: Adding a Navbar

Edit: Never mind this post. I figured out what I was trying to do, so I don’t need this post anymore.

Last edited by Mithrus (2008-02-10 22:53:26)

Offline

Board footer

Powered by FluxBB