There's an angled, green Contact button top left of my site and I'd like it to stay visible and fixed while people scroll the page. Sounds easy but can't manage it!?

1 answer

This was chosen as the best answer

It seems like you have some script controlling the position of this div, which is unnecessary.

All you need to do it set the position value of the div to fixed, however you also need to set the position of the containing element - in this case the <body> - to relative.

So the key values you need are:

<body style="position: relative;">
    <div style="position: fixed: top: 0; left: 0;">...</div>
Answered about 9 years ago by John Catterfeld
  • Wow, so simple. Worked perfect thanks..I tried adding a surrounding wrapper with position:relative earlier but I guess it has to be the body tag? Thanks again.. Leon Quinn about 9 years ago