Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBrianna Allison
3,730 PointsHow to Build A WordPress Theme - Menu only showing correctly in Chrome.
in the How to Build A WordPress Theme course I am building along and the Menu is only showing correctly in Chrome. It is showing vertical instead of horizontal. Is there a reason for this that I am missing? Or is the theme only supposed to show in Chrome?
6 Answers
Aaron Jackson
5,644 PointsCan you show your code for this? It's always easier to see what is going on.
Brianna Allison
3,730 Pointsit is the same code from the course http://teamtreehouse.com/library/how-to-build-a-wordpress-theme/converting-static-html-into-wordpress-templates/convert-blog-listing-and-single-post-templates-2 in project files.
The same thing happens with their finished code from the project files. Shows correctly in Chrome and then shows up wrong in Firefox
this is the PHP for the Nav
<nav>
<?php
$args = array(
'menu' => 'main-menu',
'echo' => false
);
echo strip_tags(wp_nav_menu( $args ), '<a>');
?>
</nav>
=====this is the CSS=====
nav {
display: -webkit-box;
-webkit-box-orient:horizontal;
padding: 2% 0;
border-bottom: 1px solid #e6e6e6;
border-top: 1px solid #e6e6e6;
margin: 2% 0 2% 0;
}
nav a { font-family: 'GoudyRegular'; display:block; -webkit-box-flex:1; text-align:center; font-size: 1.25; color: #666; }
Aaron Jackson
5,644 PointsAre you getting in errors in the dev tools console in Chrome? Sounds like there is some CSS that isn't loading properly.
Brianna Allison
3,730 Pointsno i do not, here is the link http://ballisondesign.com/blog/
Aaron Jackson
5,644 PointsOK, I see the problem. This is a CSS error, change the following code:
nav { display: -webkit-box; }
nav a { display: block; text-align: center; font-size: 1.25; }
========================================================================
nav { display: block; text-align: center; }
nav a { font-size: 1.25em; margin: 95px; }
Brianna Allison
3,730 PointsThat just breaks it in all browsers.