Jump to content

Recommended Posts

wpclincoln    0
wpclincoln

On this site I'm developing I am using this snippet of CSS to adjust the position of text in my fixednav.

.navbar .navline { position:relative; left:-29px; !important; }

It works perfectly on a desktop sized browser window. However, when the window drops in size and reflows for mobile viewing, the menu items begin off to the left of the screen. About 29px to the left, I'd guess. ;)

 

The question is - I don't know much about responsive design. Is there a way to specify that this piece of custom CSS should only apply ABOVE a certain page width?

 

Thanks for ideas!

 

-CP

Share this post


Link to post
Share on other sites
wpclincoln    0
wpclincoln

I just tried it on an actual mobile phone (Android) and it looked fine once. but not on every page. I don't know why it would behave differently from page to page, but it seems to. Strange.

Share this post


Link to post
Share on other sites
Rob    547
Rob

Hi,

 

I don't see any CSS elements in our code for .navline and have never seen anyone use the operand "left:"

 

Where did those come from?


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
wpclincoln    0
wpclincoln

@Rob - HA! I just imagineered them up, I guess. I wanted the first text in my fixed nav to move to the left by 29 pixels to line up (vertically) with the logo in my branding section below it. There is an empty spot to begin the fixed nav (where a logo would go, I believe, but I have that turned off.) I took a shot at positioning it that way and it worked. On full sized displays, at least.

 

If there is a more elegant way to accomplish that, I'm all ears! ;) I'm not a programmer by trade, I just hack around at stuff until it looks the way I like. 

Share this post


Link to post
Share on other sites
Rob    547
Rob

Try this in place of your code:

.navbar .navline {
    margin-left: 10px;
    position: absolute;
}

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
wpclincoln    0
wpclincoln

Bingo-bango-bongo! Thanks @Rob !

Share this post


Link to post
Share on other sites
Rob    547
Rob

You're welcome!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • lionel1
      By lionel1
      Hi,
      I use on my home page " impulse module " but when i look on my iPhone the image is cut and not responsive .
      i only have this problem with this module not with the other one .
      thanks for ur help
      website / www.elonakane.com 
      Lionel 
       
    • Michael Kummer
      By Michael Kummer+
      Hi guys,
      every since Chrome introduce scroll anchoring (see chrome://flags) blog posts on my page start scroll automatically as soon as the user scrolls down a bit. It is super annoying and I don't know exactly what triggers the incompatibility with Chrome's latest feature that is supposed to improve usability.
      Since I don't know what causes it (Pagelines, or a Plugin), I would like to disable the feature using a CSS override that Google describes as follow:
      "Scroll anchoring aims to be the default mode of behavior when launched, so that users benefit from it even on legacy content. A CSS property overflow-anchor can disable scroll anchoring in part or all of a webpage (opt out), or exclude portions of the DOM from the anchor node selection algorithm. This property supports the following values when applied to an element E:
      overflow-anchor: auto (the default value) declares that the DOM subtree rooted at E is eligible to participate in the anchor node selection algorithm for any scrolling box created by E or an ancestor of E. overflow-anchor: none declares that the DOM subtree rooted at E is not eligible to participate in the anchor node selection algorithm for any scrolling box created by E or an ancestor of E." Do you guys happen to know how to use that property with the ROOT element so it applies to the whole page?
      Thanks
      Michael 
    • kwaoru
      By kwaoru
      Hi,
       
      I have been using DMS and pagelines.
      I am facing to a huge trouble with the appearance of one of my page on mobile (smart phones) built with pagelines.
      However I haven’t come to any solutions to organise either edit the appearance of mobile view to look neat or deactivate the responsive function. 
      Now it looks totally messy on the phone...
       
      1. Is there any way to edit the appearance of the mobile version (responsive theme)?
      2. Is there any way to deactivate responsive function?
       
      If I could receive support from you to go thorough this process I would be happy to be a pro member. 
       
      Looking forward to hearing from you.
    • Paul
      By Paul+
      I have woocommerce store, product shows title and price fine until reduce screen with on a tablet/mobile phone the price and title gets removed?  Any ideas? 
      Here's an example page: https://thelaptopfixers.com/product/operating-system-re-install/
      Try it on both desktop PC browser then resize to mobile/cell phone size!  
      Thanks
    • kwaoru
      By kwaoru
      Hi,
      I desperately need to deactivate the responsive function on mobile for reasons. It looks so messy with the responsive look on mobile and not navigating or informative at all as it is. 
      I searched for solutions online and tries some of those that I found but nothing worked out. Also I found a previous post on this forum says that this theme pagelines DMS is not meant to be build to deactivate the responsive function... 
      Also tried with widget such as WPtouch to edit the mobile look a little more informative but as I am using "single page" theme on pagelines, the frontpage(main page) never appears on those app.
      Seems like not compatible?
      If there is no way to deactivate responsive function or I'll have to recreate another page just dedicated for a mobile page? or change the theme completely and build a page from scratch?
      I have been searching for this for two days already...
      Could anyone wise and kind out there, please help me?
       
      Thanks,
×