Lesson Plan CSS
Lesson Plan CSS
The CSS box model describes how elements are rendered on a web page. Each element
is treated as a rectangular box, consisting of four main components: content, padding,
border, and margin.
Height and Width: These properties define the dimensions of the content area
of an element. You can specify values in pixels, or other units.
max-height: This property sets the maximum height that an element can
have. If the content exceeds this height, it will be truncated or
overflowed, depending on other related properties.
min-height: This property sets the minimum height that an element
should have. If the content is less than this height, the element will
expand to accommodate the minimum height.
max-width: This property sets the maximum width that an element can
have. If the content exceeds this width, it will be truncated or overflowed,
depending on other related properties.
min-width: This property sets the minimum width that an element should
have. If the content is less than this width, the element will expand to
accommodate the minimum width.
Padding: Padding is the space between the content area and the element's
border. It can be set using properties like padding-top, padding-right, padding-
bottom, and padding-left.
Border: The border surrounds the padding and content areas. You can control its
width, style, and color using properties like border-width, border-style, and
border-color.
Examples
Margin: The margin is the space outside the border, creating the gap between
adjacent elements. It can be set using properties like margin-top, margin-right,
margin-bottom, and margin-left.
CSS Transitions
CSS transitions allow you to create smooth and gradual changes in CSS property
values over a specified duration. With transitions, you can animate properties
such as width, height, color, opacity, and more.
To define a transition, you need to specify the CSS property you want to
animate, the duration of the transition, and optional timing functions for easing
the transition.
.button:hover {
background-color: blue;
}
.button {
background-color: red;
transition-property: background-color;
transition-duration: 0.3s;
}
Cursor
The cursor CSS property sets the mouse cursor, if any, to show when the mouse
pointer is over an element
Help, wait, crosshair, not-allowed, zoom-in, grab, pointer
Lesson 6: Media Queries
/* PHONE */
@media (max-width: 767px) {
}
/* TABLET */
@media (min-width: 768px) and (max-width: 991px)
{
}
/* Laptop */
@media (min-width: 992px)
{
}
ACTIVITY: MAKE A REGISTRATION FORM