• Resolved Etienne ROSENSTIEHL

    (@etienne-r-2)


    I use Twenty Fourteen and it lokks good.
    The layout is aligned on the left and I would prefer it beeing centered as on many other thems (bb-press default, Twenty ten, etc.

    Thanks in advance
    Etienne R

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Etienne ROSENSTIEHL

    (@etienne-r-2)

    Hi everybody,
    At the end of the day I found a solution to a problem nobody was concerned about.
    The following code made my screen much nicer. However, it depends on your background image.
    Regards
    Etienne R

    #page {
    margin: 40px auto;
    }

    Thanks for sharing this outcome, Etienne. I would like to give the code a try. Can you recommend, please, whether or not it is necessary to edit pre-existing code prior to including this new code and where exactly the new code should be inserted among the existing code.

    Many thanks!

    Thread Starter Etienne ROSENSTIEHL

    (@etienne-r-2)

    Hi MargMacD,
    You can insert this code in the Additional CSS (Appearance / Customize / Additional CSS). No need to edit any other code.
    Alternatives could be :
    – insert the code in the style.css file : (Appearance / Editor) not recommended as you would have to insert it again after each and every single update of the theme.
    – create a child theme and insert this code in your own style.css file.

    In your screen, this should generate a margin of 40px above and below your page and it will center your page in the middle of your screen.
    The margin on top and bottom (40px) are here to create continuity of the background picture. It could be removed.

    Best regards
    Etienne

    Thanks for this helpful reply, Etienne. It seems that with this theme there is a limitation on altering the width of the left- and right-hand margins but not the top and bottom margins.

    Thread Starter Etienne ROSENSTIEHL

    (@etienne-r-2)

    I take your point. Top and bottom work fine. I tried to fix the leaft-hand margin and it works fine too. If you play with left and right then you lose any flexibility on the width. Moreover the screen width depends on the machine your reader uses and this is the beginning of the hell of a story.
    I much prefer starting from the width I need and then having either left alignment or center alignment.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Layout is on the left – How could it be centered’ is closed to new replies.