{"id":10,"date":"2007-04-03T09:24:00","date_gmt":"2007-04-03T13:24:00","guid":{"rendered":"http:\/\/warriormill.com\/?p=10"},"modified":"2009-04-09T08:37:20","modified_gmt":"2009-04-09T12:37:20","slug":"building-a-menu-control-that-takes-a-sitemapdatasource-part-2","status":"publish","type":"post","link":"https:\/\/warriormill.com\/2007\/04\/building-a-menu-control-that-takes-a-sitemapdatasource-part-2\/","title":{"rendered":"Building a menu control that takes a SiteMapDataSource .. Part 2"},"content":{"rendered":"

I didn\u2019t post any css in my previous post for the use of the menu control this is the css i used when i was creating it. The Menu Id is a horizontal menu and Nav Id is a vertical menu, as you can see all i have to do is assign the CssId to the control and we manage the look with css and the content in code.<\/p>\n

My next post will be about using the Roles to determine access to the user.<\/p>\n

Sample CSS:
\n[code lang=”css”]
\n\/**** Main Menu ***\/<\/p>\n

#menu {
\ndisplay: block;
\nfloat:right;
\n}<\/p>\n

#menu ul {
\nmargin: 0;
\nlist-style: none;
\n}<\/p>\n

#menu li {
\ndisplay: block;
\nfloat: left;
\nwhite-space: nowrap;
\n}<\/p>\n

#menu li a {
\ndisplay: block;
\npadding: 55px 20px 12px 20px;
\ntext-decoration: none;
\ncolor: #fff;
\nfont-weight: bold;
\n}<\/p>\n

* html #menu a {width:1%;}<\/p>\n

#menu li a:hover {
\nbackground: url(..\/img\/bg_menu.gif);
\n}<\/p>\n

#menu li a.current {
\nletter-spacing: 1px;
\ncolor: gray;
\nbackground: url(..\/img\/bg_menu.gif);
\n}<\/p>\n

#menu li a.current:hover {
\ncolor: #fff;
\n}<\/p>\n

\/**** nav ***\/
\n#nav{ list-style: none; margin: 2.0em 0; width: 25em; float: right;}
\n#nav li{ padding: 0; margin: 0; }
\n#nav a{
\ndisplay: block;
\nheight: 2.0em;
\npadding: 0.3em 0.3em 0.3em 0.8em;
\nborder-bottom: 2px; \/*solid #1a1a1a*\/
\nborder-top: 2px; \/*solid #1a1a1a*\/
\ncolor: #93B300;
\nbackground-color: #F7F9FB;
\nfont-weight: bold;
\ntext-decoration: none;
\n}<\/p>\n

#nav a:hover{
\ncolor: #1a1a1a;
\nbackground: url(..\/img\/bg_t.gif) no-repeat;
\nbackground-color: #fff;
\nfont-weight: bold;
\n}
\n[\/code]<\/p>\n","protected":false},"excerpt":{"rendered":"

I didn\u2019t post any css in my previous post for the use of the menu control this is the css i used when i was creating it. The Menu Id is a horizontal menu and Nav Id is a vertical menu, as you can see all i have to do is assign the CssId to […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[60,62],"_links":{"self":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts\/10"}],"collection":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":4,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":75,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts\/10\/revisions\/75"}],"wp:attachment":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}