Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Center header-content

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #248389
    flavoni
    Participant

    Hi Css-tricks masters of code :)

    Site: https://klvunge.mystagingwebsite.com/category/drawings/
    When scrolled you clearly see that the categories along with the back-link is aligned to the bottom of the white background. How do I center this?

    KIKO

    #248390
    Shikkediel
    Participant

    Here’s one way of doing it:

    #site-branding, #menu-menu {
      -webkit-transform: translateY(-20px);
      transform: translateY(-20px);
    }
    
    #248399
    flavoni
    Participant

    It seems to work somewhat, but in a more narrow window, (mobile-size, when categories breaks into a single “menu”) the category-content is aligned at bottom and logo-text at the top. Any solution for this?

    Thanks for help!

    #248409
    Shikkediel
    Participant

    I think I overlooked that I tested that style inside a media query. This seems to be the relevant one:

    @media screen and (min-width: 1100px) {
    
    }
    
    #248411
    flavoni
    Participant

    Ok, so how would a complete line in custom css look like?

    @media screen and (min-width: 1100px) {

    }

    –TOGHETER WITH THIS–

    #site-branding, #menu-menu {
    -webkit-transform: translateY(-15px);
    transform: translateY(-15px);
    }

    #248412
    Shikkediel
    Participant

    It (and possibly other style rules) can be nested inside the media query:

    @media screen and (min-width: 1100px) {
    #site-branding, #menu-menu {
      -webkit-transform: translateY(-15px);
      transform: translateY(-15px);
    }
    }
    
    #248414
    flavoni
    Participant

    Many thanks to you Shikkediel. It works.

    #248415
    Shikkediel
    Participant

    Cheers, nice looking site by the way.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.