s
basic boxes, inline, blocks, resizing, span and side by side codes, extension of div and span..
boxParms -
style : #myBox { width, height;}
Simple basic fixed size box managed by style.
Makes use of # in the style.
Style : .myBox { width: 300px; height: 100px; border: 2px solid red; }
This is a smaller box. It make use of (dot).
uses box-sizing: content-box, but must exclude height so the the height will be adjusted automatically. This box use the # in the style.
uses box-sizing: border-box, but must exclude height so the the height will be adjusted automatically. This box use the (dot) in the style
float - default is same as left
![]() |
![]() |
Tags - involving div extension
Let the user resize only the width of this div element.
To resize: Click and drag the bottom right corner of this div element. The contents will be readjusted and height will change accordingly to accomodate all the text
Tags with float - the three boxes float side by side
tags without the float
Tags without float - boxes are stacked one above the other
Display - involving span extension
This is the default normal text for a paragraph.
This an Inline-block display using the textBY class. The values have been chosen so that it would display properly. Because of the padding 10x, the line-height is increased to 1.8. It allows width and height to be defined and does not add a line-break after the element.
This is an inline_block display using the tag textBox. Text is restricted to the box size with a border. It does not display correctly in Dreamweaver. The browser shows it as a single overall border.The class textBlock is used here. The display is block. Notice that textBY, textBox, and textBlock are listed in the style dropmenu. Added inline code float: right
Here are two span class textBox, placed side by side. This is the first span This is the second span with class textBlock. Although they are placed side by side, the yappear as two boxes where on is stacked above the other. Notice that textBY, textBox and textBlock are listed in the style dropmenu. Used the inline code to increase the width for more text.
Display : inline with two span_a placced side by side
Here again there are two class textBY placed side by side, like the above. The result is they are combined into a single block. Because of the padding 10x, the line-height is increased to 1.8. It allows width and height to be defined and does not add a line-break after the element. This is the second span with class textBY. Because of the padding 10x, the line-height is increased to 1.8. It allows width and height to be defined and does not add a line-break after the element.
Display2 -