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:
And replaced with this:
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?
<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>
Viewing 15 lines of 28 lines. View entire code block.
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?
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
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
- 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
<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>
Viewing 15 lines of 36 lines. View entire code block.
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??
try to change <div id="header"> ... </div>
into
into
<header> ... </header>
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>
yeah, give it a try :D
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
k. dinner time :D
i'll look at it later
i'll look at it later
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>
good to hear :D
the 'display:inline-block'
where is that ?
the 'display:inline-block'
where is that ?
In the main.css
#nav > ul > li { position: relative; display: inline-block; margin-left: 1em;
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.
But now...how does it behave, what is it that is not working ?
Add some screenshots etc.
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.
It seems like the only thing that doesnt work is the display:inline-block for some reason..
[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...
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...
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
Take a look at concrete\themes\elemental\css\build\header.less
You probably took the nav out of the header section ?