Changed my HTML into C5 can't get Nav to work like it does in my HTML site

Permalink
Any idea why when I get the site going everything pulls the correct CSS but the nav? I took this from my html:
<nav id="nav">
                     <ul>
                        <li class="current"><a href="index.html">Home</a></li>
                        <li>
                           <a href="#">Dropdown</a>
                           <ul>
                              <li><a href="#">Lorem dolor</a></li>
                              <li><a href="#">Magna phasellus</a></li>
                              <li><a href="#">Etiam sed tempus</a></li>
                              <li>
                                 <a href="#">Submenu</a>
                                 <ul>
                                    <li><a href="#">Lorem dolor</a></li>
                                    <li><a href="#">Phasellus magna</a></li>
                                    <li><a href="#">Magna phasellus</a></li>


And replaced with this:
<?php
    $a = new Area('Nav');
    $a->display($c);
?>

So I could edit and add a Nav block in C5 but it won't use the CSS properties I have set.. how do I do that?

landollweb
 
WillemAnchor replied on at Permalink Reply
WillemAnchor
I guess you use elemental on 5.7 ?

Take a look at concrete\themes\elemental\css\build\header.less

You probably took the nav out of the header section ?
landollweb replied on at Permalink Reply
landollweb
No used a HTML template I found on the internet to test.. everything works great but I can't get the nav section to work or use the CSS that was with the template
WillemAnchor replied on at Permalink Reply
WillemAnchor
please tell a bit more..not much to go on

- do you want to know how to include the css ? or
- how do you include the css ?
- if so, was it loaded ?
- do you get errors in your console ?

- what version of c5 do you use
landollweb replied on at Permalink Reply
landollweb
<div id="header">
               <!-- Logo -->
                  <?php
    $a = new Area('Logo');
    $a->display($c);
?>
               <!-- Nav -->
                  <nav id="nav">
                     <ul>
                        <li class="current"><a href="index.html">Home</a></li>
                        <li>
                           <a href="#">Dropdown</a>
                           <ul>
                              <li><a href="#">Lorem dolor</a></li>
                              <li><a href="#">Magna phasellus</a></li>

That is what I have for header section... I just want to know how's come it doesnt work and use the CSS in the main.css file for the header but everything else works??
WillemAnchor replied on at Permalink Reply
WillemAnchor
try to change <div id="header"> ... </div>
into
<header>
...
</header>
landollweb replied on at Permalink Reply
landollweb
So change it all to this then???

<header>
               <!-- Logo -->
                  <?php
    $a = new Area('Logo');
    $a->display($c);
?>
               <!-- Nav -->
                  <?php
    $a = new Area('Nav');
    $a->display($c);
?>
            </header>
WillemAnchor replied on at Permalink Reply
WillemAnchor
yeah, give it a try :D
landollweb replied on at Permalink Reply
landollweb
That didn't work.... This is the template I'm using just to test creating a 5.7 theme.. and I can't seem to get the Nav to look anything like thathttp://html5up.net/arcana
WillemAnchor replied on at Permalink Reply
WillemAnchor
k. dinner time :D
i'll look at it later
landollweb replied on at Permalink Reply
landollweb
Awesome by changing it to this I have it working all but the display:inline-block which is what i need most colors all match now
<div id="header">
               <!-- Logo -->
                  <?php
    $a = new Area('Area Name');
    $a->display($c);
?>
               <!-- Nav -->
                  <div id="nav">
                     <?php
    $a = new Area('Nav');
    $a->display($c);
?>
                  </div>
            </div>
WillemAnchor replied on at Permalink Reply
WillemAnchor
good to hear :D

the 'display:inline-block'
where is that ?
landollweb replied on at Permalink Reply
landollweb
In the main.css

#nav > ul > li {
            position: relative;
            display: inline-block;
            margin-left: 1em;
WillemAnchor replied on at Permalink Reply
WillemAnchor
Ok, that's in the template's main.css
But now...how does it behave, what is it that is not working ?
Add some screenshots etc.
landollweb replied on at Permalink Reply 2 Attachments
landollweb
The one that looks good is what it SHOULD look like the one where it is a vertical list is what mine is so its not getting the CSS for some reason.
landollweb replied on at Permalink Reply
landollweb
It seems like the only thing that doesnt work is the display:inline-block for some reason..
WillemAnchor replied on at Permalink Reply
WillemAnchor
[quote]Awesome by changing it to this I have it working all but the display:inline-block which is what i need most colors all match now[/quote]

part of the css is working ?

I guess not,
How do you include the css ? do you use registerAsset / requireAsset ?

http://www.concrete5.org/documentation/developers/5.7/assets/overvi...
landollweb replied on at Permalink Reply
landollweb
Just like a normal HTML site... its under a CSS folder and I use the <link rel="stylesheet" href="<?= $view->getThemePath() ?>/assets/css/main.css" /> so the php file finds it on the server