Home > front end >  For the position is fixed element set width is 100%, width is beyond the parent element lot, how to
For the position is fixed element set width is 100%, width is beyond the parent element lot, how to

Time:09-29

Want to make an article directory, directory fixed position requirements, set for the position for fixed, width is beyond the parent element a lot,,,

CodePudding user response:

The position is fixed element width is 100% is reference to the entire browser window, not a reference to the parent element,
You'd better set a fixed width

CodePudding user response:

reference 1/f, the sky wave response:
position is fixed element's width is 100% of the entire browser window, not a reference to the parent element,
You'd better set a fixed width


I passed the js dynamic access width, find the solution for a long time, seems to have only can do that

CodePudding user response:

Can be changed to width: calc (100%); Try, for calc calculation value is always relative to his parent element
  • Related