OK, after I figured out what each class is responsible for, I got everything mapped!!! Here is a working sample: http://www.dnndirect.com/CssAdaptersTutorial/WalkThru/Simplemenu.aspx
Seems like I almost got the menu from http://www.cssplay.co.uk/menus/drop_line.html#nogo, which works with sample walkthrough menu example from CSS adapters toolkit. The remaining pieces of work are:
1) Make graphics preattier (experiment with different styles)
2) Split CSS into functional and presentational part (hope somebody can help). I am unclear how to do that split...
3) Create elm.lft and elm.rght. I think each main menu "a" element has to be wrapped with those tags... In order to do it I think I will need to modify CSS adapter' source code... Please let me know what you think
4) That is the most important! Make the second level menu to stay, I am not sure how to acomplish this, I guess this deserves a seperate thread... Right now it disapears once I move the mouse out. Not sure if I can acomplish this with CSS only or do i need to write somw java script...
Here is the final CSS (please feel free to use it):
.foo {} /* W3C CSS validator likes CSS files to start with a class rather than a comment. Soooooo.... *//* This style sheet is intended to contain RARELY CHANGED rules used when the Menu control adapter is enabled. */
/* These rules correspond to the "pure CSS menu" technique that have been evolving over the past several years. */
/* See WhitePaper.aspx for details. */
.AspNet-Menu {
position: relative;
width:750px;
height:2em;
background:#b7c6ac;
border-top:10px solid #b7c6ac;
padding-bottom:1px;
background:#b7c6ac url(menu/line.gif) bottom left repeat-x;
margin-bottom:5em;}
* html .AspNet-Menu {padding-bottom:0;}
.AspNet-Menu ul{
list-style-type:none;
padding:0;
margin:0 0 0 20px;
width:730px;
height:100%;}
.AspNet-Menu li{
float:left;}
.AspNet-Menu table{
position:absolute;
border-collapse:collapse;
left:0;
top:0;}
/* properties of the text in the cell of the first line of the menu */
ul.AspNet-Menu li a, ul.AspNet-Menu li span, .AspNet-Menu :visited {
color:#fff;
text-decoration:none;}
.AspNet-Menu a em.lft, .AspNet-Menu :visited em.lft {
display:block;
float:left;
width:5px;
height:2em;
background: transparent url(menu/lefta.gif);
border-bottom:1px solid #777;}
ul.AspNet-Menu li, .AspNet-Menu :visited {
display:block;
font-weight:normal;
float:left;
padding:0 10px;
height:2em;line-height:1.9em;
background: transparent url(menu/mida.gif);
cursor:pointer;
border-bottom:1px solid #777;}
.AspNet-Menu a em.rgt, .AspNet-Menu :visited em.rgt {
display:block;
float:left;
width:5px;
height:2em;
background: transparent url(menu/righta.gif);
border-bottom:1px solid #777;}
ul.AspNet-Menu ul
{
visibility:hidden;
position:absolute;
height:2em;
top:2em;
left:-20px;
width:749px;
border-bottom:1px solid #777;
border-right:1px solid #777;
background:#ccc; }
.AspNet-Menu :hover {
white-space:normal;}
/* when hover over the text in the first line of menu, sets properties of menu item text*/
/*TO DO embed em.lft and em.rgt tags in the adapter code, wrap each top level tag in it... */
ul.AspNet-Menu a:hover, ul.AspNet-Menu span:hover{
color:red;
background: transparent url(drop/midb.gif);
border-bottom-color:#000;}
.AspNet-Menu a:hover em.lft {
background: transparent url(drop/leftb.gif);
border-bottom-color:#ccc;}
.AspNet-Menu a:hover em.rgt {
background: transparent url(drop/rightb.gif);
border-bottom-color:#ccc;}
/* when hover over the menu cell in the first line of menu, sets properties of menu cell*/
ul.AspNet-Menu li:hover
{
color:#000;
background: transparent url(menu/midb.gif);
border-bottom-color:#000;}
.AspNet-Menu li:hover > a em.lft {
background: transparent url(menu/leftb.gif);
border-bottom-color:#ccc;}
.AspNet-Menu li:hover > a em.rgt {
background: transparent url(menu/rightb.gif);
border-bottom-color:#ccc;}
/* controls how the second line of menu is displayed once hover over menu item in the first line of menu */
ul.AspNet-Menu li:hover ul,
ul.AspNet-Menu a:hover ul{
display: block;
visibility: visible;
top: 2em;
margin-top: 1px;}
/* hover over the main menu, sets properties of a each item in the second line of menu */
ul.AspNet-Menu :hover ul li {
display:block;
border-left:1px solid #777;
background:#ccc;
height:2em;}
/* hover over the main menu, sets properties of a link in the second line of menu */
ul.AspNet-Menu :hover ul li a {
display:block;
font-size:0.8em;
height:2em;
line-height:2.5em;
width:auto;
float:left;
color:black;
padding:0 10px;}
/* hover over the main menu and hover over the link in the second line of menu, sets color of link */
ul.AspNet-Menu :hover ul li a:hover {
color:red;}
Rafal
Zikbay.com - The Best Free Online Classifieds DNN Direct