Is there anyway to have a sub style’s property be determined by another styles property? For example
.sidebar #menu{
width:100%;
}
.sidebar #menu #Sub{
left:(.sidebar #menu.width)px;
}
So in this case the submenu would be positioned to the right of the menu element. This isn’t exactly what I am coding but this is the general concept that I need to use in my menu. This way no matter what size their screen is the sub menu will always be right beside the main menu. FYI I am new to css, so if you know the answer please explain it at a beginners level.
I would recommend jQuery in this example. Use the following: