Css Best Notes
Css Best Notes
<element class=“class”> …
</element>
DIV.Slogan {font-weigh:bold}
style
Our new…:
“We
teach…
Resulting
<DIV CLASS=Slogan>Our new text
Slogan is:<BR>”We teach CSS”</DIV>
HTML code
With the <span> tag, you can use inline elements, e.g.,
<B>, <I>
To create a container for inline elements, use:
<span CLASS=class_name>
inline elements
</span>
padding border
margin
By: Swati Sharma
Controlling the Margins
To define the margins of an element, use:
margin:value
where value = a length value (“px” is often used), a
percentage (a margin proportional to the element’s width,
or auto
float:right
float:right width:50px
width:50px clear:right
background-image
background-repeat
background-attachment
background-position