css - How to set an element to window width without using code? -


the element's immediate parent element has width can wider window width.

i element containing paragraphs of text not require horizontal scrolling, ie width should automatically adjusted window width.

i can couple of lines of jquery code, can done css alone?

you can use vw approximate window width (its not window width, 99% of time work). css3, though. units vhand vw act percentage of viewport size. more info here: https://developer.mozilla.org/en/docs/web/css/length

heres example:

div { width: 100vw; } /* div width of viewport, or browser window (most of time)*/ 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -