Fixed row - Post ID 280073

User 2903050 Photo


Registered User
260 posts

Hi, I am attempting to keep the top row in a fixed position when scrolling. Why does the content of the row go to the left when I fix the position of the row and add the Z-index to 999 and how do i solve this as I want the header to be centred (currently have the margins set to auto for that column)?
Kind regards
User 2624719 Photo


Registered User
283 posts

Hi Phillip
i would look at sticky option in the position tab this might work if you add that to the row it should stay at the top
Regards Adrian
User 379556 Photo


Registered User
1,602 posts

In answer to the question 'Why ...?', I suspect there may be an illogic in trying to have an 'auto' setting for a fixed position.

Using the Fixed position I have centered an elememt by setting the left 'fixed' margin to 50%, and the 'normal' left margin to a negative figure that is half the width of the element to be centred.

For example, if the element to be centered is 250px wide, the 'fixed' left margin is 50%, and the 'normal' left margin is -125px.

Frank
User 2699991 Photo


Registered User
5,391 posts
Online Now

Phillip Dias wrote:
Hi, I am attempting to keep the top row in a fixed position when scrolling. Why does the content of the row go to the left when I fix the position of the row and add the Z-index to 999 and how do i solve this as I want the header to be centred (currently have the margins set to auto for that column)?
Kind regards


if you look at the row that you have made fixed in inspector pane you will see by hovering over the row (in inspector) that the row has shrunk to the width of the content the column(s) is holding

go to display pane & with the row still selected change the width from "auto" to 100% or other % as you desire (the max width setting will determine the actual width)
All the contents of that row will then follow, and all the contents of the column(s) in that row will then follow too.
so if you have set the header to center that's where it will be once the row width has been corrected.
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS


A simple quick way to contact me
https://mawarputih.coffeecup.com/forms/contact-wayan/
User 2903050 Photo


Registered User
260 posts

Hi, thats brilliant now Wayan Jaya. Only problem now is that all the other content is always underneath the fixed row from the start?
Regards
User 122279 Photo


Senior Advisor
14,648 posts
Online Now

You need to give the next row/column/container (whichever it is) enough top padding so that it comes clear of the fixed row. And probably adjust that padding at the various breakpoints
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2699991 Photo


Registered User
5,391 posts
Online Now

Phillip Dias wrote:
Hi, thats brilliant now Wayan Jaya. Only problem now is that all the other content is always underneath the fixed row from the start?
Regards


Sorry I forgot to mention

I always put another row in after the fixed row. then I make the column for that row, the same height (max height same as height) as the column in the fixed row. (use inspector pane once again to see how much you need adjust the height of the new column to.)
That way you don't need mess about with padding/margins for your other rows.

I give the new row/column a class name of fixed-row-spacer,, so that I can recognize it at a later date, and not accidentally delete it because it is an empty cow/column

Ingers way also works
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS


A simple quick way to contact me
https://mawarputih.coffeecup.com/forms/contact-wayan/

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.