MultiformeIngegno

  • Posts: 1,337
CSS issue
« 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... :^^;:

forumsearch0r

  • Posts: 118
Re: CSS issue
« Reply #1, on September 30th, 2013, 08:32 PM »
position:relative should work if both the main and the sub menu are assigned the same value.

MultiformeIngegno

  • Posts: 1,337
Re: CSS issue
« Reply #2, 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 :)

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: CSS issue
« Reply #3, 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...

MultiformeIngegno

  • Posts: 1,337
Re: CSS issue
« Reply #4, 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