Make my image full width

大兔子大兔子 提交于 2021-02-17 05:21:06

问题


How do I edit this in my css

.container, .navbar-static-top .container, .navbar-fixed-top .container,     .navbar-fixed-bottom .container {
  width: 1170px;
}

The website is http://insightcxo.com/test-2

I want to make the image full width or 1230px

This is the code I have in the editor

.page-id-731 .container {
width: 1230px;
}

Thanks!


回答1:


Img { width:100%; max-width: 100%; } should work for you.




回答2:


I want to make the image full width or 1230px

img { min-width: 1230px; }

You mean something like this?




回答3:


I have looked at the code from the link you provided. Your website markup has a .container block that has a width of 1170px width which is centered by having margin-left: auto; and margin-right: auto; This creates a padding of 60px because the website with is set to 1230px.

The image you want to be full-width has a left padding of 30px because the parent .container width is 1170px and and the image width is 1230px.

To fix the problem,

change .container width to 1230px

or

add margin-left: -30px; to the image CSS.




回答4:


You can just use the following:

.wp-image-844{
width:100%;
max-width:100%;
}

It should be specific enough to target your one image and make it full-size :)



来源:https://stackoverflow.com/questions/31329887/make-my-image-full-width

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!