WordPress.org

Ready to get started?Download WordPress

Forums

Is there a way to @media display the sidebar horizontially? (5 posts)

  1. skeeterz71
    Member
    Posted 5 months ago #

    Hi,

    At a @media break point I would like the sidebar content to go from vertical to horizontal? Anybody know of a tutorial that will show me how to do this?

    Thanks

  2. alchymyth
    Forum Moderator
    Posted 5 months ago #

    in what theme?

  3. skeeterz71
    Member
    Posted 5 months ago #

    I created my own theme using the _s aka underscores.me as my starting point. Automatic makers of WordPress made it, so I am guessing sidebar widget is a sidebar widget is a sidebar widget:) Theme shouldn't matter.

  4. alchymyth
    Forum Moderator
    Posted 5 months ago #

    sidebar widgets can have any amount and kind of HTML which can be formatted with any amount and kind of CSS - and that is highly theme dependent.

    as with all formatting questions - Theme does matter.

    something like this might work specifically for Twenty Fourteen:

    @media screen and (max-width: 1008px) { /*adjust widgets when sidebars drop down*/
    	.primary-sidebar .widget {
    		width: 22%;
    		float: left;
    		margin-right: 3%;
    	}
    	.primary-sidebar .widget:nth-child(4n+1) {
    		clear: left;
    	}
    }
  5. skeeterz71
    Member
    Posted 5 months ago #

    Thanks for the replay. I tried that code with some adjustments. It didn't work. After some research I found a theme called hemingway https://wordpress.org/themes/hemingway that appeared to have a horizontal sidebar in the footer. So I downloaded it and explored some. The way they did it is made 4 footer widgets that sit side by side. I am thinking I may do the same. This way I can set display to none on the sidebar widget at a break point and then display the footer widgets at that break point. I'm gonna explore that theme a little more and see how they did stuff..

Reply

You must log in to post.

About this Topic

Tags

No tags yet.