无法设置div的宽度

时间:2021-02-24 21:12:34

I've got a CSS conflict that's preventing me to set the width of a div and I'm really struggling to see where it is.

我有一个CSS冲突,阻止我设置div的宽度,我真的很难看到它的位置。

Can someone give me a hand?

有人可以帮我一把吗?

It's this div here:

这是这个div:

body.node-type-campaign #com_col_two {
width: 400px;
padding: 0;
border: 1px solid blue;
}

A link to the page: http://www.wdm.org.uk/test-campaign

该页面的链接:http://www.wdm.org.uk/test-campaign

Thanks!

谢谢!

3 个解决方案

#1


3  

Remove the inline-style width:auto; from <div id="com_col_two">

删除内联样式宽度:auto;来自

#2


0  

Have you tried just:

你有没有尝试过:

#com_col_two {
width: 400px;
padding: 0;
border: 1px solid blue;
}

And remove all the added properties on the <div> tag?

并删除

标签上的所有添加属性?

You have a lot of classes applied to the elements in your page.

您有很多类应用于页面中的元素。

Also, have you tried using Firefox with Firebug. I'm sure a lot of people would recommend using that.

另外,您是否尝试过使用Firefox和Firebug。我相信很多人会推荐使用它。

#3


0  

Check out FF's Web Developer Toolbar or Chrome's Developer Tools: both have a CSS view which shows you which style definition affects this specific element (it is triggered by rightclick->Inspect element).

查看FF的Web开发人员工具栏或Chrome的开发人员工具:两者都有一个CSS视图,显示哪个样式定义影响这个特定元素(由rightclick-> Inspect元素触发)。

#1


3  

Remove the inline-style width:auto; from <div id="com_col_two">

删除内联样式宽度:auto;来自

#2


0  

Have you tried just:

你有没有尝试过:

#com_col_two {
width: 400px;
padding: 0;
border: 1px solid blue;
}

And remove all the added properties on the <div> tag?

并删除

标签上的所有添加属性?

You have a lot of classes applied to the elements in your page.

您有很多类应用于页面中的元素。

Also, have you tried using Firefox with Firebug. I'm sure a lot of people would recommend using that.

另外,您是否尝试过使用Firefox和Firebug。我相信很多人会推荐使用它。

#3


0  

Check out FF's Web Developer Toolbar or Chrome's Developer Tools: both have a CSS view which shows you which style definition affects this specific element (it is triggered by rightclick->Inspect element).

查看FF的Web开发人员工具栏或Chrome的开发人员工具:两者都有一个CSS视图,显示哪个样式定义影响这个特定元素(由rightclick-> Inspect元素触发)。