Loading...

Top
PFQ Banner

This is PokéFarm Q, a free online Pokémon collectables game.

Already a user? New to PFQ?

Single post in A Somewhat Extensive Guide to BBCodes

Forum Index > PokéFarm > Guides > A Somewhat Extensive Guide to BBCodes >

Ganorith's AvatarGanorith
Ganorith's Avatar

QUOTE originally posted by Magikx

How do I get,for example an 80% wide hide box, to be aligned in the centre? edit; Btw, I know I can just use the margin-left code with percentages but I'm kinda hoping there's an easier way >.<
If you're fine with using just margin, you could always use
margin: 0 auto;
to center it.

Code

.panel{ width: 80%; margin: 0 auto; }
Or, you could use a container with
text-align: center;
with .panel having a display of
inline-block
if you really don't want to use margin, but there is a lot of extra code for something that could easily be done in less lines.

Code

.box { text-align: center; } .box .panel { width: 80%; display: inline-block; text-align: left; }
PFP/BG/IMG from Golden Sun Code Collection
© PokéFarm 2009-2024 (Full details)Contact | Rules | Privacy | Reviews 4.6★Get shortlink for this page