dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

CSS: Spacing and Areas : Page 4

Learn to use proper spacing and make good use of your Web pages.


advertisement

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Width
{width: XXunits/%}
The width property lets you set the width of an element.

Width can be specified using absolute or relative units. Relative units calculate the width of an element using the width of the element's containing block. It is illegal to use negative values for width. The width property cannot be applied to table rows.

Example:



img {width: 1.5in}

logo

If you are using a CSS-enabled browser, the Project Cool logo is 1.5 inches wide.

img {width: 50px}

logo

If you are using a CSS-enabled browser, the Project Cool logo is 50-pixels-wide.

img {width: 25%}

If you are using a CSS-enabled browser, the Project Cool logo is a quarter as wide as this browser window.





Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date