The problem is this: I have a div that is the daughter of a li element of an ul that does not start in the corner of the page. There are two subproblems:
1 - I need to be able to expand this div so that it fills the entire width of the page with resolution.
2 - I need it to always take up the width when I scroll.
Structure:
Estrutura:
<ul class="main-menu">
<li class="menu-item nossos-hoteis">
<a class="menu-link" href=""><span>Nossos Hotéis</span></a>
<div class="submenu">
</li>
</ul>
CSS:
/ * submenu * /
display: none;
position: absolute;
width: 872px;
height: 500px;
padding: 20px 30px;
/ * main-menu * /
.main-nav .main-menu {
display: none;
list-style: none;
padding: 0;
margin: 0;
}
/ * menu-item * /
.main-nav .main-menu>.menu-item {
display: table-cell;
height: inherit;
position: relative;
text-align: center;
padding: 0 15px;
}
The solution I was trying so far was too gambiarrada that was to put the div with the width of the screen in JQUERY and set left negative to depend on resolution range. Resolve, solve 1 but I think that maybe there may be a better solution even because when I scroll on the screen because it is being defined a manual left the div stops occupying the entire screen.