doutuoshou8915 2015-03-03 18:18
浏览 211

如何在wordpress移动主题中更改搜索栏的位置

I'm a bit of a newbie with web design. I'm self-hosting a Wordpress site at noisehole.com, and I'm using the MH Magazine template. I've created a child theme and modified it to include a search bar above the header, outside of the standard widget areas.

However, when viewing the site on a mobile device (or just shrinking the horizontal width of the browser window), you can see that the search bar and the Noisehole logo do not cooperate well with each other.

I'd like to set the page up so that with sufficient width, the search bar appears to the right of the Noisehole logo (as it does today), but on a mobile browser (or small-width desktop browser), the search box appears below the Noisehole logo.

I believe I need to do this in the header.php file (with some additional styling rules in styles.css), but I'm just not strong enough with my PHP skills yet to figure out how. Can anyone help?

  • 写回答

1条回答 默认 最新

  • douzai9405 2015-03-03 18:27
    关注

    If I were you, I would suggest hiding the search bar when the browser width falls under 768px (with a CSS media query) and making a new search bar appear in the mobile friendly nav bar at the top only when the browser is under 768px (if that makes sense!)

    That's with the assumption that you want the search bar on the mobile version.

    评论

报告相同问题?

悬赏问题

  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示