PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Oct 19, 2017 3:58 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Nov 28, 2016 9:38 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6384
Location: Montreal, Canada
It's not perfect, but what if you used vw instead of px for the menu width?
Syntax: [ Download ] [ Hide ]
.main-small-navigation ul {
  width: 100vw;
  margin-left: calc(-50vw);
}


Again, not a front end guy, but hopefully that's enough to get you started.


Attachments:
Screen Shot 2016-11-28 at 9.39.41 AM.png
Screen Shot 2016-11-28 at 9.39.41 AM.png [ 710.07 KiB | Viewed 831 times ]

_________________
Supported PHP versions No longer supported versions
Top
 Profile  
 
PostPosted: Mon Nov 28, 2016 9:47 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4349
Location: United Kingdom
After a little tweaking with it:

Syntax: [ Download ] [ Hide ]
.main-small-navigation ul {
    margin-left: calc(-63vw);
    width: 95vw;
}

Works perfect!
So what is "vw", and what is that calc(-63vw) ??

Not heard of either of those.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Mon Nov 28, 2016 9:49 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6384
Location: Montreal, Canada
https://css-tricks.com/viewport-sized-typography/
https://css-tricks.com/a-couple-of-use-cases-for-calc/
https://developer.mozilla.org/en-US/docs/Web/CSS/calc

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Mon Nov 28, 2016 9:52 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4349
Location: United Kingdom
I'll have a good read through. Thanks so much.
That was a challenging one!

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group