如何從父容器應用於元素的強制寬度中移除元素?從父容器應用於元素的強制寬度中移除元素
<div id="container"> <!-- This div is forcing the site to be 960px width. Also It holds all the content that the site has -->
<div id="extra"> <!-- I would like to make this div responsive full width so that the image that the div holds will always be stretched from browser's left border to the right border -->
<img src="orange.jpg">
</div>
</div>
我無法編輯原始網站的CSS。這就是爲什麼我無法修改包含.container的代碼的比例。我只能將CSS添加到網站。
我一直在嘗試使用不同的位置命令,但他們似乎沒有帶來所需的解決方案。我無法從左到右獲取圖像範圍。
我可以使用哪些解決方案來解決這個問題。我只能使用CSS。我正在通過SiteOrigin插件使用WordPress和PageBuilder。
當你說的格「額外」應該有充分的寬度,你的意思是格「容器」的全寬? – LGSon
不,我想要div「額外」瀏覽器的全部寬度。假設我的瀏覽器Chrome已打開,我正在查看該網站。瀏覽器窗口寬度設置爲1500px。我想這個寬度是div「extra」的寬度。如果我將瀏覽器窗口調整爲例如。 1100px寬度的「額外」div寬度應相應設置爲1100px。而「額外」div被重新設置,「容器」div不會改變總是960px寬度。 –