Css menu Builder - Post ID 173003

User 2311846 Photo


Guest
7 posts

Hi all - I am new to Coffee Cup I have recently downloaded html to give it a shot. One of the features i am very keen on is the css menu builder to enable me to implement a drop down menu for my site. I have trawled the net looking for a suitable menu finding one or two. I did try one which looked ok but the drop downs failed to work on the ipad. The second one i tried i could not place it where i wanted to on the web page, i tried for hours but got nowhere. The css menu builder looks great with coffee cup I compiled a dummy one but yet again unable to locate it on the page where i wanted it. Any ideas how i can work this out. I am a novice so please bear this in mind. Thank you.
User 187934 Photo


Senior Advisor
20,193 posts

You could put your menu in a div and then add to your css style to control is position.:)
<div id="nav"> My menu code here</div>

div#nav{
height:34px;
width: 650px;
margin-left: 120px;
}
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2311846 Photo


Guest
7 posts

Thank you Eric, I understand the first part re the menu code and where to put it, where do I put the second part, I apologise for my ignorance, Leif
User 187934 Photo


Senior Advisor
20,193 posts

Are you using css on your current page?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2311846 Photo


Guest
7 posts

Only for a current very basic menu which I intend to remove completely once i get my head around the css menu i have built with coffee cup
User 187934 Photo


Senior Advisor
20,193 posts

For now put this in between the head tags of your page. You can always move it to a separate style sheet later.

<style type="text/css">
<!--
div#nav{
height:34px;
width: 650px;
margin-left: 120px;
}
-->
</style>

You'll have to adjust the values to fit your menu.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2311846 Photo


Guest
7 posts

Thank you Eric I will give this a try, Leif
User 187934 Photo


Senior Advisor
20,193 posts

Post back if you have any questions. We have a few people that hang around here that are better with css then I am.:) They always help me up when I fall down.:lol:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2311846 Photo


Guest
7 posts

Ok thank you - I will try this out tomorrow afternoon to see how I get on, all the best Leif
User 122279 Photo


Senior Advisor
14,461 posts

It is not such a good idea to set a fixed left margin, unless you want to have the menu a certain number of px from the left side, regardless of screen size. It wouldn't be possible without a lot of sideways scrolling on mobile devices anyway. Better, provided you want to center the menu horizontally, is setting the

margin: auto;

Also, the width of the div nav has to be the same as the menu, because the code centers the div nav, but the menu itself will position itself left-aligned inside that div. In order to see what I'm doing when I adapt the width of such a div, I give it a border of any colour that is easy to see against the page background. When you have got the necessary width sorted, you just delete the line about the border. So my suggestion would be:
<style type="text/css">

div#nav{
height:34px;
width: 650px;
margin: auto;
border: 1px solid red;
}

</style>



Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.