Navbar Problem
-
Hello, was hoping to get some help. I can add links to my navbar just fine, but it messes up the rest of the theme. The articles are supposed to be centered, but when I add to the navbar it un-centers everything. If it helps, here is my header.php code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head xmlns=""> <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" rel="stylesheet" /> <link title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" type="application/rss+xml" rel="alternate" /> <link href="<?php bloginfo('pingback_url'); ?>" rel="pingback" /><?php wp_head(); ?> </head> <body xmlns=""> <div id="wrapper"> <p class="top"><a class="rss" href="<?php bloginfo('rss2_url'); ?>">RSS feed</a><a class="rss" href="<?php bloginfo('comments_rss2_url'); ?>">RSS comments</a></p> <div id="header"> <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1> <ul> <li><a href="<?php echo get_option('home'); ?>">Home</a> <?php wp_list_pages('title_li=&depth=1'); ?></li> <li><a href="http://www.your-url-here.com/">YOUR LINK NAME</a></li> </ul> <form id="search-form" action="<?php bloginfo('url'); ?>/" method="get"> <label>Search: <input name="s" value="<?php the_search_query(); ?>" type="text" /> <input id="button" type="submit" value="Submit" /> </label> </form> </div> </div> </body> </html>What would I be doing wrong here? Thanks for any help.
-
A link to your site would be more useful…
You’ve got a few validation errors in your theme that you need to sort out. They may be contributing to your problem.
Are these links supposed to go under the Links heading in the sidebar? Can you add at least 1 so I can see what happens?
No, I want to manually add links to the navbar. I went ahead and made a fake link in the sidebar, but it didn’t fix anything.
What exactly do you mean by validation errors?
Even with that fake link, I can’t see any problem in either Firefox 3 or IE7. In what way is the theme being messed up?
What exactly do you mean by validation errors?
Web pages are supposed to follow certain rules. Browsers try to use those same rules to decide how to display web pages. Since your pages ‘break’ some of those rules, 1 or more web browsers could have a problem trying to figure out how to display your pages. And when browsers have problems, they normally end up showing ‘broken’ pages.
Like I said, everything under the navbar is supposed to be centered. When I even edit the header.php at all, it un-centers everything. I think I am running IE6 but this is the first time I’ve ever had a problem making a web page.
Ok, so now how do I go about fixing those errors? Thanks for trying to help me but if it’s going to be this much trouble Im just gonna dump WordPress. This is the only free theme I’ve come across that looks even relatively appealing to me…so getting another theme is pretty much out of the question.
Which navbar? The one at the top or the one at the side?
At the top…-_-;
Where it says Home and YOUR LINK NAME. That is where I want to add links, the top, not the side. I know it can be done because there were links there on the theme’s demo site.
Those links aren’t centred. To add a couple more links, just use the format:
<li><a href="http://www.your-url-here.com/">link text</a></li>but ensure that you add these lines after the
<ul>and before the</ul>.I don’t think you’re understanding what I’m talking about. The links in the navbar aren’t supposed to be centered. I want the articles (paragraphs under the navbar), and the sidebar to be centered in the page. Both were centered before I started messing with the navbar.
I know how to add links, that’s not my problem…does no one else here understand what I’m saying? I wouldn’t have thought it would be this hard to get a straight answer..
It would probably help if you removed:
</div> </body> </html>from your header.php and did the same in footer.php. And removed the javascript that’s currently outside the second lot of
</body></html>tags in the footer. as I said, you have some serious validation errors, Fix those and your problem will almost certainly vanish.But I didn’t add those, they were there when I downloaded the theme. I don’t see how removing those would help anything.
Thank you for trying to help me but I’m done with trying to figure this out. I’ll find something better to make my site with.
The topic ‘Navbar Problem’ is closed to new replies.