Replies

Sep 29, 2017 8 years ago
Flying Ace
norfie
User Avatar
Gerald Neil Calhoun

Hello! I have not done web coding in ages and I fear I am really rusty.

I am wanting to cover the scrollbar on a profile. I have this defined in css: { position: absolute; background-image: url([my_image_url_here]); left: 880px; top: 200px; width: 17px; height: 370px; z-index: 1; } with my url as the background url.

and then after the ending style tag of my CSS, I have

The scrollbar cover is appearing, but its position is relative to column1. In fact, it is IN column 1, stretching it (You can see this behavior on my profile now). Why is this happening when the position is absolute? What did I miss?

Thanks! :D

"Every bit of you is worthy of your loving." - Emmanuel

Sep 29, 2017 8 years ago
Silverfish
is a survivor
User Avatar
Xingese

Well, think of it that way. If the scrollbar you are trying to fix is the scrollbar of column1 and the textbox you are typing the code into (the html part) is also in column1, then the element you create will naturally also be inside column1. You cannot make a column1 element somehow magically be outside and over the thing it is inside of.

Try using a column2 or 3 textbox to create a div in for this purpose :D

Art by p-sebae ❤️
| | -Night Mode- Shengui Guo Custom CSS [v2.0]

Looking to adopt a December 31st, 1969 glitched date pet

Sep 29, 2017 8 years ago
Bug
User Avatar
Segfault

Absolute positioning is always relative to the closest absolute or relatively positioned parent - not to the window.

Since column1 is set to position:absolute, and your element is inside of column1, it will be positioned relative to column1.

[edit] Further reading on this

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Sep 29, 2017 8 years ago
Flying Ace
norfie
User Avatar
Gerald Neil Calhoun

Thanks and ! That helps me understand positioning better. :) I actually did try putting the HTML in column 2 earlier, but then it was relative to column 2. But that makes sense now. I guess I need to put in in a column that has no positioning defined on it and nothing else in it (column 3)... and then somehow hide the header for the blank section it it in.

I'll give that a try later. Thanks!

"Every bit of you is worthy of your loving." - Emmanuel

Please log in to reply to this topic.