Wedge

Public area => The Pub => Off-topic => Topic started by: MultiformeIngegno on September 30th, 2013, 08:06 PM

Title: CSS issue
Post by: MultiformeIngegno on September 30th, 2013, 08:06 PM
Nao you're a css genius so you have to help me :P
Here's my website: http://bassano.cngei.it/beta/

As you can see when hovering the primary menu, a .sub-menu appears. Problem is I can't find a way to have that sub-menu positioned just under the start of the primary menu. If you change resolution the sub-menu position changes... I tried everything... fixed width, position:relative, fixed, etc... :^^;:
Title: Re: CSS issue
Post by: forumsearch0r on September 30th, 2013, 08:32 PM
position:relative should work if both the main and the sub menu are assigned the same value.
Title: Re: CSS issue
Post by: MultiformeIngegno on September 30th, 2013, 09:02 PM
Uhm, yes if I set .menu-menu-1-container to position:relative, .sub-menu mantains its position changing resolution.. but it doesn't "take" all the screen anymore (even if width:100% is set, because it's 100% of the parent object I presume).. how can I make the width of .sub-menu 100% of the body?

Thanks for your help :)
Title: Re: CSS issue
Post by: Nao on September 30th, 2013, 10:05 PM
Doable but only by rewriting the header to be the relatively positioned div and then setting a hardcoded top for both the menu and sub menus.

Honestly, I would rely on JS for best results, but...
Title: Re: CSS issue
Post by: MultiformeIngegno on October 1st, 2013, 07:22 PM
I ended up with a dirty hack. width:300% and if I remember correctly (I'm from the phone right now) padding-left like 400px... :P
Seems to work