Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 图像在浏览器窗口调整大小时未调整大小-由绝对位置引起?_Jquery_Html_Css - Fatal编程技术网

Jquery 图像在浏览器窗口调整大小时未调整大小-由绝对位置引起?

Jquery 图像在浏览器窗口调整大小时未调整大小-由绝对位置引起?,jquery,html,css,Jquery,Html,Css,我有一个并排的div站点,其中一个是绝对定位的。绝对定位div是导航区域,因此设置为在滚动上保持静态(您可以在这里看到:evanbeltran.com) 当你点击一个图像页面时,如果浏览器窗口太小,图像就会出现在导航分区下。我尝试了最大宽度和高度css,但是不管我把它们放在哪里,它们都不会做任何事情。我想知道的是如何在非绝对定位的div中调整图像的大小。你可以看看我在这里的意思: 谢谢您的帮助。试试这个: // Remove the width and margin-right from #co

我有一个并排的div站点,其中一个是绝对定位的。绝对定位div是导航区域,因此设置为在滚动上保持静态(您可以在这里看到:evanbeltran.com)

当你点击一个图像页面时,如果浏览器窗口太小,图像就会出现在导航分区下。我尝试了最大宽度和高度css,但是不管我把它们放在哪里,它们都不会做任何事情。我想知道的是如何在非绝对定位的div中调整图像的大小。你可以看看我在这里的意思:

谢谢您的帮助。

试试这个:

// Remove the width and margin-right from #content2 then add:

#content2 {
  padding-left: 250px;
}

// Remove the margin-left from .image so it looks like this:
.image {
  width: 100%;
  list-style: none;
  margin: 0 auto;
  margin-top: -130px;
  padding: 10px;
}

// set a max width on your image
.padder {
  padding-bottom: 25px;
  max-width: 100%;
}