Container responsive styles
HTML Tutorial » Container responsive styles
A container is a <div> tag with a class=“container”. The container will affect all elements between " <div> </div>" tags with class=“container”.Syntax:
margin: value;
padding: value;
height: value;
width: value;
background-color: value;
display: flex;
}
<div class="container"> your_text </div>
div is a tag.
class is an attribute of div tag
container is a class name.
In order to have a superior web page design to meet today's requirements, we can style the class of containers such as: responsive, fluid, box, border, row padding, size, width, center, table, background color.
Create a flex container
How do you make a Flex container? To create a flex container, we have to set the value of the area's container's display property to flex or inline-flex . The direct children of that container become flex items.
<!DOCTYPE html>
<html>
<head>
<title>How do you make a Flex container? - example</title>
<style>
.container {
width: 90%;
height: auto;
display: flex;
background-color: #FF9;
margin-right: auto;
margin-left: auto;
color: #066;
} </style>
</head>
<body>
<div class="container">
<h2>This is a Flex container? - example</h2>
<p><strong>Your text here</strong></p>
<p> Another text : - Grape silver beet
collard greens avocado quandong fennel gumbo black-eyed
pea watercress potato tigernut corn groundnut.
Chickweed okra pea winter purslane
coriander yarrow sweet pepper radish garlic
brussels sprout groundnut summer purslane
earthnut pea tomato spring onion azuki bean gourd. Gumbo kakadu plum komatsuna
black-eyed pea green bean zucchini gourd
winter purslane silver beet rock melon
radish asparagus spinach. - </p>
<!-- end container div class --> </div>
</body>
</html>
Related subjects:
div class container
contrainer tag
div class container
How do I make a size box?
How do I make a size"container" box in HTML?
To make a size "container" HTML element you mast declare size value as width and height in <style>:
<!DOCTYPE html>
<html>
<head>
<title>How do I make a size box? - example</title>
<style>
.container {
width: 90%;
height: auto;
background-color: #FF9;
margin-right: auto;
margin-left: auto;
color: #066;
} </style>
</head>
<body>
<div class="container">
<h2>your container title here</h2>
<p>This is a paragraph </p>
<p>under the containe box </p>
<p><strong>Your text here</strong></p>
<p> Another text : - Grape silver beet collard
greens avocado quandong fennel gumbo black-eyed
pea watercress potato tigernut corn groundnut.
Chickweed okra pea winter purslane
coriander yarrow sweet pepper radish garlic
brussels sprout groundnut summer purslane
earthnut pea tomato spring onion azuki bean gourd.
Gumbo kakadu plum komatsuna
black-eyed pea green bean zucchini gourd winter
purslane silver beet rock melon
radish asparagus spinach. - </p>
<!-- end container div class --> </div>
</body>
</html>
Tags: container class, fluid, tags, elements, box, border, template, row padding, responsive, size, width, center, table, background color
How do I make border and padding "containers"?
To make a border and padding "container" element you mast declare border: value, and padding: value as in the next example <style>:
<!DOCTYPE html>
<html>
<head>
<title>How do I make border and padding "containers"? - example</title>
<style>
.container {
width: 90%;
height: auto;
border: medium solid #F00;
padding: 30px;
background-color: #FF9;
margin-right: auto;
margin-left: auto;
color: #066;
} </style>
</head>
<body>
<div class="container">
<h2>your container title here</h2>
<p>This is a paragraph </p>
<p>under the containe box </p>
<p><strong>Your text here</strong></p>
<p> Another text : - Grape silver beet
collard greens avocado quandong fennel
gumbo black-eyed
pea watercress potato tigernut corn groundnut.
Chickweed okra pea winter purslane
coriander yarrow sweet pepper radish garlic
brussels sprout groundnut summer purslane
earthnut pea tomato spring onion azuki bean gourd.
Gumbo kakadu plum komatsuna
black-eyed pea green bean zucchini gourd winter
purslane silver beet rock melon
radish asparagus spinach. - </p>
<!-- end container div class --> </div>
</body>
</html>
container class, fluid, tags, elements, box, border, template, row padding, responsive, size, width, center, table, background color
Container responsive styles - html tutorial
This tool makes it easy to create, adjust, and experiment with custom colors for the web.

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.

Find here examples of creative and unique website layouts.

Find here examples of creative and unique website CSS HTML menu.