New Landing How can we help? Themeforest Theme Support Flexform Centering an element

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Flexform
  • #1294
    [email protected]
    Member
    Post count: 1

    How would you recommend I go about centering an element in a page body.  Let’s say a block of text or an image or a form.  What is the best way to display this centered?  Should I approach it by writing custom CSS using margin: 0 auto?

    Just trying to keep my code clean. Any advice would really help!

    #1374
    Cosmin – SUPPORT
    Member
    Post count: 3851

    It really depends on the element itself, but generally using margin: 0 auto; on block elements, will do the trick. Inline elements such as span or img, go with text-align: center; on their parent, but you need to make sure they’re not defined as block elements in CSS (with display: block;)

    Regards,

    ————————————————————————————————————

    Cosmin
    Support Assistant

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register