If content inside it increases more than the height of the div then the div must become scrollable using scroll bar.Code: divId width: 500px height: 600px overflow: auto . However, I am trying to contain the slides in one fixed-sized div in my html page. I have a div of fixed height and fixed width and would wish the fullpage.js slides to play within that div. I tried but I cannot get the height to be reduced to prescribed fixed height. I am trying to put an image on the side of a video and keep heights of both elements the same. I want to use divs instead of a table but I cant figure out how to do it. The scale on the right side has a fixed width. I have a div and i have a set width for the style of that div. i want to be able to type the content and stop it from becoming wider, i want the content to go to the next line and keep the same width.A div must float somewhere in order to have a fixed width. Like this By setting the height and width of the div element you can "crop" an image that is larger. Also, use background-position:center to make sure it is always centered in the div. UPDATE. All I have found so far is how to align contents within a div with fixed height. Id like to keep these divs with those widths and heights. Result so far, looks like this : (Drag the picture a bit to notice the bottom blank space). so i want to make a div container, which i give a fixed height and want that it automatically fit its width to the content in it, even if it is over 100 of the screen width. Simply by declaring width:auto on the css of the div wont work, because its not becoming bigger than 100 of the screen.