• Resolved amuletts

    (@amuletts)


    I am trying to customize this theme so that the homepage and category page scrolls horizontally, not vertically. The idea is it will be like walking along a gallery wall with paintings hanging up.

    I can get it to work on regular pages by styling

    .container {
      float: left;
      white-space: nowrap;
    }

    Unfortunately it is not regular pages I need to do this, but the homepage and category page.

    I have tried styling #primary-home with the same to no effect. I have also tried:

    #primary-home {
      height: 700px;
      width: 1100;
      overflow-x: auto;
      overflow-y: hidden;
    )

    However this just results in an unresponsive scrollbar and the content disappearing :s

    I can cheat by forcibly setting the width to something very large. I haven’t managed to do that *just* for the homepage/categories though, only the entire site!

    Any help much appreciated.

Viewing 8 replies - 16 through 23 (of 23 total)
  • Thread Starter amuletts

    (@amuletts)

    Yes! That worked! Thank you!

    That’s a handy thing to know about Chrome.

    I’ll add that to the website and should be problem solved ??

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    How are you thinking of adding it?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    1.
    Set up a child theme, put your JS into a javascript file and then enqueue that javascript file in the footer (through functions.php)

    or
    2.
    Use a custom JS plugin

    Thread Starter amuletts

    (@amuletts)

    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/hwidth.js"></script>

    But that doesn’t seem to be working. What am I doing wrong?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Not putting it in your footer

    Thread Starter amuletts

    (@amuletts)

    LOL okay it’s in the footer and it’s working now ??

    HOORAY! Thank you so much!!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Note that when modifications have been made to theme files, without the use of a child theme, then when the theme updates those modifications will be erased.

    Thread Starter amuletts

    (@amuletts)

    Thank you, yeah I know I’m going to neaten things up a bit and put changes into a Child Theme now.

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Help need horizontal on home & category page’ is closed to new replies.