Skip to content Skip to sidebar Skip to footer

Aligning Div Inside Another Div

You can visit the site I am working on here. Currently, I am working on making the site relative. I am adjusting the CSS for a resolution with a width less than 820px. This involve

Solution 1:

For bottom:0 to work, you need the element that it's being applied to to be absolutely positioned. You also need, in this case, to have it's parent relatively positioned. Try this:

.navulli {
    display: inline-block;
    margin-right: 70px;
    position:absolute;
    bottom:0;
}

Solution 2:

Adding position value will resolve your issue.Please update your css in the following section.

@media screen and (max-width: 820px) {
.nav {
border: 2px solid red;
bottom: 0px;
position:absolute;
left:16%;
}
}

Solution 3:

For bottom:0; to work, your class="nav" has to have absolute positioning.

CSS:

.nav {
position: absolute;
bottom: 0;

Post a Comment for "Aligning Div Inside Another Div"