Spfx webpart positioning issue

Copper Contributor

Screenshot (1).png

Hi there,
I'm facing an issue of displaying the right side bar in spfx web part on the site page in communication site. When i load the side bar in online/local workbench, it is working fine(coming from top of the page). But in site collection, it is starting from the web part area, but not from the top of the page, even though i provide higher z-index for that div. Any solutions for this  ?
Note: this was working months back (last checked on august 2018)

1 Reply

Hard to tell exactly from your screen shot and not seeing the solution. Sounds like your css position isn't set correctly. Looks like you are using absolute positioning, but that is only positioned to the nearest positioned ancestor (your web part). You'll likely to use Fixed positioning.