• Hello,

    sorry I don’t know how to formulate it well:
    I want my page to start in the middle, or at a certain distance in pixel from the top, without an anchor.
    Is there an easy solution for that ? or plugin?
    I didn’t find anything so far

Viewing 8 replies - 1 through 8 (of 8 total)
  • If I understand correctly, what you’re asking can be done with CSS either using the body tag or some other element of the page.

    Typically, you would create a child theme of your parent theme so your modifications are overwritten by a theme update unless your theme has a means of adding custom CSS, and enter the following into the child theme’s style.css:

    body {
      top: 25px;
    }

    Change the “25px” to whatever value you want to move the page down. You could also use margin-top.

    The other thing you can do is set a minimum-height and center the content in the window vertically. There are lots of options with CSS.

    Thread Starter Mathieu robot

    (@mathieu-robot)

    cool! thanks!
    in my case it worked by putting a negative value, otherwise I had a white margin on the top of the page.

    thanks again

    Thread Starter Mathieu robot

    (@mathieu-robot)

    oh! wait a minute.
    I just realize that now there is a similar white margin on the bottom.
    is there any way to get rid of it?

    Can you provide a link to the site?

    Thread Starter Mathieu robot

    (@mathieu-robot)

    I don’t think you should use a negative number for top. It’s just going to introduce problems, like the white band at the bottom and covering up your blog in the band below the slider.

    It looks like your slider is designed/set up to take the full height of the screen, and I suspect it is that you’re trying to change. Can you explain a little more what you’re trying to achieve?

    Thread Starter Mathieu robot

    (@mathieu-robot)

    Ok, I see, but the positive number just did the same with a white margin on the top of the page instead.

    some explanations…
    to create that page, I took the theme BIG PIX to which I added a navbar (BIG BIX didn’t have one).
    https://wpdevshed.com/themes/big-pix/

    the problem with adding the navbar to BIG PIX is that it moves down the whole layout in a ugly way (it breaks its concept with the slider that take the full height of the screen), especially on the mobile phones’ small screens.
    In other words, my goal is to put back the slider on the full height of the screen with the navbar overlaying above it.

    That’s why I need to start the page about 60 pixels lower (and even more on smaller screens), to make the page fit the original layout with the nav bar above.

    do you get me?(I’m scared to be a bit confused)

    I think I see what you’re trying to accomplish.

    It looks like you will need to play with the location of your logo and navbar HTML, maybe moving it up closer to the mobile navigation and out of its current location. You could also try putting everything except your new navbar into a wrapper div, and use the wrapper to move everything down if just moving the navbar up didn’t do it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘how to start a page not at its top ?’ is closed to new replies.