odog
(o)
September 14, 2015, 10:20pm
1
My menu works great, but I have a tab (button) that won’t behave. The top goes over the next section.
I want it to stay aligned right under my shopping cart icon directly beneath the black bar and move down when the menu get taller.
https://preview.webflow.com/preview/npi?preview=b93098fafc77f1cfb703ae4d523804eb![|690x95](upload://7IzcjXUWIDcOpU8eNFhzQW4dQue.jpg)
Auto position puts the button over a white background.
Thanks in advance for your help.
~:-)
odog
(o)
September 15, 2015, 11:26pm
2
@cyberdave would you mind sharing your madd geek skillz with me on this?
~:-)
sabanna
(Anna)
September 16, 2015, 1:24am
3
Hi @odog !
Let me help you with this issue.
I would recommend to put that button inside the section, that goes right after navbar. Give the section position: relative, and button position: absolute, top,right. And sure remove top margins from the button
It will keep that button always stick to the bottom of navbar, no matter what screen size or device will be used.
Cheers,
Anna
odog
(o)
September 16, 2015, 3:30pm
4
Sabanna,
Thanks for you jumping in to help.
~:-)
The section below the navbar is going to change from page to page.
I think it makes best sense to keep it in the header.
But, I’m open to how it might work best.
sabanna
(Anna)
September 16, 2015, 3:32pm
5
Well, then put inside the nav, just position will be not top, but bottom left and -50px from bottom(for example)
odog
(o)
September 16, 2015, 4:23pm
6
Sabanna,
I attempted to follow your insight.
But, I missed something.
~:-)
sabanna
(Anna)
September 16, 2015, 5:00pm
7
You have to remember about relationship between Absolute and Relative positioned elements.
odog
(o)
September 16, 2015, 6:24pm
8
Thanks for the fancy diagram.
I mean that.
~:-)
I made the changes.
It didn’t appear to make a difference.
sabanna
(Anna)
September 16, 2015, 6:37pm
9
You did not do one very important change: section “black back” should have relative position
odog
(o)
September 16, 2015, 6:56pm
10
Eureka! It worked.
It works brilliantly from 1200px wide and lower. Thank you.
But, it continues to move right on wide screens. Is there a way to have the relative position constrained to the width of my 1200px container?
sabanna
(Anna)
September 16, 2015, 8:01pm
11
Well, then just put this “button” inside the container where is navbar sit and do the same relationship. Only this time Button will have negative positioning not only at the bottom but on the right side.
odog
(o)
September 18, 2015, 4:32pm
12
I moved the button all around in the header area and even in the Navbar.
It works nicely on smaller screens, but it still goes wide on the large screens.
I’m thinking I could create a div that is 1200 px wide and align my button to the right inside.
I would appreciate your continued insight.
sabanna
(Anna)
September 18, 2015, 8:41pm
13
Hi @odog ,
you don’t really need to create any div, because you already has one with max-width = 1200px, it has class container .
So all you need is
move button inside that container
give that container position: relative (it will make button with position: absolute, aligning in reference to container)
Then you will just make final aligning as you wish
Regards,
Anna
1 Like
odog
(o)
September 18, 2015, 10:59pm
14
Anna,
It worked. I really appreciate you showing and teaching me how to get this rocked.
Thanks You!
~:-)
1 Like
sabanna
(Anna)
September 19, 2015, 12:41am
15
That’s awesome that you learned! It is brightest part of my volunteering!
1 Like
system
(system)
Closed
November 18, 2015, 9:42pm
16
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.