How to Make a Container Expand in HTML

Next Video:
How to Make a Footer Message in HTML....5

Making a container expand is something you can do with the careful implementation of the right piece of HTML code. Make a container expand in HTML with help from a programmer and web designer in this free video clip.

Part of the Video Series: Web Design & WordPress
Promoted By Zergnet


Video Transcript

Hi, I'm Omar, and I'm a programmer. Today, I want to show you how to make a DIV container expand using style sheets in HTML. So the first thing you want to do is go ahead and fire up your favorite HTML editor. I'm using TextEdit for convenience sake, but you can use Notepad, Notepad Plus Plus, whichever one you are more comfortable with. So, as you can see, I already have some boiler plate HTML codes set up. All it is is a test page and I have a DIV container with some content. This is a DIV that I want to expand. The easiest way to do it is to set the style right into the DIV flag. So you just go to your DIV flag and put style equals and in the quotations you want to expand the width. So all you have to do is put width colon, let's say 100 pixels in case you want to expand it to that and that's all you have to do. If you want to expand to say 150, all you have to do is change the width to 150 pixels. If you want to expand the height, just add height and do the same thing. And that's all you have to do. I'm Omar, and I just showed you how to make a DIV expand using HTML. Thanks for watching.


Related Searches

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!