T
T
Toshegg2016-06-24 23:08:00
css
Toshegg, 2016-06-24 23:08:00

How to make the block width with position: fixed like the parent?

Hello!
There is bootstrap markup with 24 columns:
.col-sm-18.col-sm-offset-3>.col-sm-8>.menu-fixed
Example:
https://jsfiddle.net/kcumf0m8/2/
I want so that the red block in the example is the size of the parent, but the percentage width of the fixed block is for some reason considered relative to the size of the entire document, and not relative to the parent. Is it possible to get the red block to be the size of the gray (parent) block without resorting to manually calculating percentages relative to the entire document, but using only the bootstrap grid?
Thanks in advance for your reply!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Wolf, 2016-06-24
@mannaro

No, because position:fixed knocks the block out of the document.
You can use hacks and (or) JS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question