Height The height property lets you set the vertical height of an element

Height the height property lets you set the vertical

This preview shows page 7 - 8 out of 8 pages.

Height:The height property lets you set the vertical height of an element. Height should only be used in situations where you know the exact height of the element content, such as an image. At other times,you may need to create a box with specific dimensions for a design. It is a better practice to let the content determine the height of the element.
Background image
The height property accepts either a length value or a percentage. The percentage value is based on the height of the containing element box. The following is an example of height property usage:div {height: 150px;}PTS:1REF:268-269 | 2725.Describe the float, clear, and overflow properties.ANS:Float:The float property lets you position an element to the left or right edge of its parent element. You can float an image to the left or right of text.The style rule for the floating image floats the image to the left and adds a margin to offset the text from the image. The style rule looks like this:img {float: left;margin-right:10px;}The float property can also be used to float a content box to the left or right of text. Used with the width element, you can create a content box.Clear:The clear property lets you control the flow of text around floated elements. You only use the clear property when you are using the float property. Use the clear property to force text to appear beneath a floated element, rather than next to it.The clear property lets you clear from either left- or right-floating images using the left or right values.The both value lets you control text flow if you have floating images on both the left and right sides of the text.Overflow:The overflow property lets you control when content overflows the content box that contains it. This can happen when the content is larger than the area it is designed for, especially when a height property is set for a content element.To solve this problem, you can add an overflow property to the element. You can choose to show scrollbars or to hide the overflow content.PTS:1REF:272-273 | 275-277
Background image

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture