Forums

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

Home Forums CSS Not all centered wrappers center their children

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #241373
    justcodeit
    Participant

    http://codepen.io/BennyHH/pen/jqdYyd

    Notice that the content within the div (.wrap) has its content centered by using text-align: center within the header (.siteHeader) . However, the content within the div (.wrap) within the section (.galSection) won’t center.

    #241374
    Senff
    Participant

    Because the contents of .wrap are all in a UL with class “gallery”, and this is your CSS for that, where you specifically state text should be justified:

    .gallery li {
        font-size: 1.33rem;
        text-align: justify;  /*  <--- over here! */
        padding: 10px;
        line-height: 1.5;
        margin-top: -5px;
    }
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.