This is probably the most looked up piece of coding in CSS. Just place the following in your main content or wrapper div.
This sets the top and bottom margins to 0px and left and right to auto. The same is achieved with the following:Code:margin: 0px auto;
Most coders tend to use the first method as opposed to the second, but both achieve the same result.Code:margin: 0px auto 0px auto;
The Margin tag is followed by Top, Right, Bottom & Left.
Care should always be taken for cross-browser compatibility, especially with Internet Explorer which does not follow standard coding methods.
Hybrid
█ creative visuals beyond imagination ● Digital Port
There are currently 1 users browsing this thread. (0 members and 1 guests)