How do prevent a div from resizing? [closed]

Tags: html,css

Problem :

2 weeks ago I started with learning HTML and CSS, and I really enjoy it.

I've been struggling with getting my footer(div) to resize with my background on my Home page, though. So whenever I zoom in or out the background stays, but the footer(div) moves around. The same when I resize my browser.

It just looks weird. You can say I want to "glue" my div to the background so they resize and move together. It's hard to explain, but try taking a look. (the website is still in a work in progress, not finished at all)

It doesn't look great.

Does anyone know how I can fix this?

Solution :

You have min-width: 1200px set on #wrapper. That's creating an issue with the nav area not being flexible if the browser is resized. However, you will need to refactor the <nav> elements so they also resize in with the nav/footer bar. You might try using float instead of position to start with.


#navbar {
  float: right;
  margin-left: 700px;
  margin-top: -155px;
  width: 50%;

    CSS Howto..

    How to change the dimensions of a div depending of a number extern to that div? jquery/css

    How to make the logo drop a bit in the nav menu and other suggestions

    How should I escape image URLs for CSS?

    How do I center align the items in my menu?

    How to create 'greater than' arrow using CSS only?

    How to add css styles on aria-hidden attribute

    Validatation error “Value Error : background-position Too many values or values are not” How to solve?

    CSS selector: How to select element sibling AND element itself?

    How to change CSS display property using an anchor tag?

    How do I grey out the default text of a text box?

    How to get inner and outer width to a single element?

    How can I get some padding between these form boxes?

    How to get length of elements with a certain css attribute?

    How to create circles around a circle with css, javascript?

    how to center submenu under the parent `
  • `
  • How can I apply CSS to a JPG server-side?

    how to download google fonts in version bold

    How can I change the background-color using ng-class?

    How to make and use LESS templates?

    How can I override CSS inherited properties

    CSS selector for showing descendants doesn't work properly

    How to right align last two columns of a table with CSS

    How to make HTML component is not covered by footer menu?

    How do I make :hover inside div style? [duplicate]

    How to add margin-top to Responsive Multi-Level Menu and not effect navigation animation?

    How to slide/grow a tile to position with 90x90px with CSS

    How can I build a dynamic menu using CSS and JavaScript?

    How do I add colored corners to a background image?

    How to add my custom css class to a html element

    how to modify height of a div when hover it and with transition (priority of CSS without Javascript)