I want to show a menu within regular text, so that the text wraps around my menu. Any suggestions guys?
The menu with text:
This is some text with an <ul id="ddmenu"><li><a href="#">option link</a><ul class="ddsubmenu"><li><div id="ddmenudiv">and a second</div></li></ul></li></ul>
Using the div containing the submenu item to make the background going over the regular text.
My css:
/*Init */
ul#ddmenu, ul#ddmenu ul.ddsubmenu {
padding:0;
margin: 0;
}
ul#ddmenu li, ul#ddmenu ul.ddsubmenu li {
list-style-type: none;
display: inline-block;
}
/*Link Appearance*/
ul#ddmenu li a, ul#ddmenu li ul.ddsubmenu li a {
text-decoration: bold;
color: #000;
padding: 0px;
display:inline-block;
}
/*Make the parent of sub-menu relative*/
ul#ddmenu li {
position: relative;
}
/*sub menu*/
ul#ddmenu li ul.ddsubmenu {
display:none;
position: absolute;
top: 30px;
left: 0;
width: 100px;
}
ul#ddmenu li:hover ul.ddsubmenu {
display:block;
}
#ddmenudiv {
background: #fff;
z-index: 999;
}