interview questions and answers

Web Technologies Interview Questions | CSS Interview Questions

Home interview questions Web Technologies interview questions CSS 
Friday, 10 February 2012
Main Menu
Home
Online Test
Contest
Search
FAQs
Contact Us
Login
Most Popular Category
JAVA

Microsoft Technologies
ASP, C#, DotNet, ...

Programming
C++, PHP, VB, ...

SAP

Testing

Web Technologies

Polls
Does personal networking help in job search?
 
IT Placement Papers interview questions Web Technologies interview questions CSS

This category contains CSS Interview Questions and Answers


How do I center block-elements with CSS1?

PDF Print E-mail

There are two ways of centering block level elements: 1. By setting the properties margin-left and margin-right to auto and width to some explicit value: BODY {width: 30em; background: cyan;} P {width: 22em; margin-left: auto; margin-right: auto} In this case, the left and right margins will each be four ems wide, since they equally split up the eight ems left over from (30em - 22em). Note that it was not necessary to set an explicit width for the BODY element; it was done here to keep the math clean.




Be first to comment this article

Only registered users can write comments.
Please login or register.

 
< Prev   Next >

Web Technologies Interview Questions | CSS Interview Questions

Top!
Top!
Copyright © 2008 InterviewDuniya.com All Rights Reserved.
Partner Site: Maheshwari Matrimony