Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Joel A. Villarreal Bertoldi on Dec 14, 2009 11:02
open dhtmlx forum
CSS positioning of icons in dhtmlxMenu

Not actually a question, more like a suggestion.

I wonder: instead of using margin-top for positioning icons in the dhtmlxMenu control, wouldn't be best to use top, since you're working with absolute positions?

Between asterisks I've marked the modifications I made. This way, the icons are positioned identically across IE6 (if I'm not mistaken), IE7, IE8, FF3 and Chrome 4.

Just my two cents.

.dhtmlxMenu_dhx_skyblue_Middle img.dhtmlxMenu_TopLevel_Item_Icon_left {
    position: absolute;
**    top: 3px; **
    right: none;
    left: 5px;
    width: 16px;
    height: 16px;
    background-position: top left;
    background-repeat: no-repeat;
}
.dhtmlxMenu_dhx_skyblue_Middle img.dhtmlxMenu_TopLevel_Item_Icon_right {
    position: absolute;
**    top: 3px; **
    left: none;
    right: 5px;
    width: 16px;
    height: 16px;
    background-position: top left;
    background-repeat: no-repeat;
}
Answer posted by Alex (support) on Dec 15, 2009 02:44

Hello,

Thanks for your suggestions. We really have plans to improve menu layout. Your solutions can be useful for us.