Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #801525

    Hello Kriesi team!

    I want to center my main. I changed the position absolute and so far I’ve done it with margin-left: 14em but its not satisfactory since changing the viewport size doesn’t keep the main centered.

    Any help is greatly appreciated!

    #802239

    Hey captainkwak,

    You can use position: relative; instead and remove the left margin you have added since the left and right margin are already set to auto, it should be centered just fine :)

    Best regards,
    Nikko

    #802527

    Hi Nikko,

    Thanks for your help! This doesn’t unfortunately solve my problem since I want the main to overlap my header. With position: relative I haven’t been able to accomplish this thus I’ve used absolute positioning.

    #802584

    Hi,

    If you are using absolute position, the only way to center it is to use

    
    left: 50%;
    margin-left: -50px

    where -50px should be changed to negative 50% of the width of the container. Hope this helps.

    Best regards,
    Nikko

    #802585

    This did the trick. Thank you very much, Nikko!

    #802595

    Hi,

    Glad we could help and thanks for using Enfold :)

    Best regards,
    Nikko

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.