Scrolling, sidebar and @media

I have an intuition that I'm doing something wrong. What is the β€œright” way to do this?

I currently have nav.span3 for navigation on the left and section.span9 where the content goes. However, in @media print I want to hide nav . This pushes my content to the left, which is desirable, and introduces a 3 cm gap on the right side, but it is not.

I cannot change .span9 to .span12 inside CSS @screen print ; and the definition of my own class with dependent width (copied from Bootstrap .span9 and .span12 ) seems bad, because I feel like I am invading Bootstrap space. So I'm a bit of a dead end, which would be a better option.

How can I hide my nav and resize the content accordingly?

+4
source share
1 answer

I do not think that if this is a good solution (in your case), I would rewrite the width of .span9 to 100% in the style.css file

0
source

Source: https://habr.com/ru/post/1488204/


All Articles