Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

Fixed button css - not working?


Recommended Posts

I think I need fresh eyes, can anyone explain what isn't working with my css? I have fixed buttons on the sides of my pages. I had them working on desktop and mobile, but tablet wasn't showing up because I had messed around with it too much I think.

so started over using the side that worked perfect and got it to show up on tablet but now on desktop and tablet one button is not fully to the edge, mobile is fine.

 

Previous code that some how worked on desktop ( was full width, worked on desktop and mobile wouldn't show up on tablet)

Quote

/*STYLES FOR FLOATING BUTTON -PREV */
#previous-page {
  position: fixed;
  top: 92%;
  right: 1240px;
  transform: rotate(90deg) translateX(0%);
  transform-origin: 100% 0;
  :hover {
  background-color: #F42D27; /* red */
    color: white;}
  z-index: 99999;
}
#previous-page a {
  background: #ADAA99;
  color: white;
  display: inline-block;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  font-family: "brother-1816";
  padding: 10px 30px;
}
@media only screen and (min-width: 280px) and (max-width: 992px)
{
  #previous-page{
    bottom: 0;
    right: 280px;
    top: auto;
    transform: none;
  }
  #previous-page a {
    padding: 10px 30px;
  }
}

 

 

 

New code that works on mobile, desktop and tablet but now doesn't sit flush to the edge on desktop and tablet..

Quote

/*STYLES FOR FLOATING BUTTON (UPDATED)*/
#previous-page {
  position: fixed;
  top: 75%;
  left: 0px !important;
  transform: rotate(270deg) translateX(0%);
  transform-origin: 100% 0;
  :hover {
  background-color: #F42D27; /* red */
    color: white;}
  z-index: 99999;
}
#previous-page a {
  background: #ADAA99;
  color: white;
  display: inline-block;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  font-family: "brother-1816";
  padding: 10px 30px;
}
@media screen and (max-width: 1024px) {
  #previous-page {
    bottom: 0;
    top: auto;
    transform: none;
  }
  #previous-page a {
    padding: 10px 30px;
  }
 
  @media screen and (min-width:600px) {
  #previous-page {
    bottom: 0;
    top: auto;
    transform: none;
  }
}
}

 

see screenshot for where its sitting, I cant seem to move it over any further then that on both desktop and tablet?

 

site is : https://flugelhorn-seahorse-lzrb.squarespace.com/?p

pw: design123

buttons are on the portfolio pages

any suggestions is much appreciated

Screen Shot 2021-09-23 at 12.22.14 PM.png

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

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


×
×
  • Create New...