![]() |
|
Best ways to center content Vertically AND Horizontally? - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Best ways to center content Vertically AND Horizontally? (/Thread-Best-ways-to-center-content-Vertically-AND-Horizontally) |
Best ways to center content Vertically AND Horizontally? - zoran - 02-08-2015 What are the best ways to center content both vertically and horizontally? Obvious basic horizontal centering... Quote:margin-right: auto;I've heard of something like Quote:left: 0;Doesn't it matter whether the container is relative, absolute, or fixed? What else should be used to control the placement? RE: Best ways to center content Vertically AND Horizontally? - spidert2h - 02-10-2015 Are you using Dreamweaver, zoran? Do you know how to write HTML by hand? RE: Best ways to center content Vertically AND Horizontally? - Pirate - 02-10-2015 both ways? lolwut? RE: Best ways to center content Vertically AND Horizontally? - Dave_mybb_import15192 - 02-20-2015 I usually just do this when I am really lazy and call it good: Code: <center>
INSERT BULLSHIT HERE
</center>Code: .Absolute-Center {
margin: auto;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
}RE: Best ways to center content Vertically AND Horizontally? - chaserapira - 02-20-2015 Have you tried turning it off and on again RE: Best ways to center content Vertically AND Horizontally? - Dave_mybb_import15192 - 02-20-2015 (02-20-2015, 05:41 AM)chaserapira Wrote: Have you tried turning it off and on againThis has worked as well in dire times. Try it as well. xD RE: Best ways to center content Vertically AND Horizontally? - Black Veil Brides - 04-11-2015 I don't understand exactly what you mean by this. |