English 中文(简体)
战胜一行风格! 重要内容
原标题:Overiding an inline style with !important from a .css file
  • 时间:2012-04-07 16:41:04
  •  标签:
  • html
  • css

I m aware technically you can t do this as inline always takes president. Inline element with styles:

element.style {
    width: 185px !important;
}

之后,在风格的档案中:

.something ul li {
     width: 179px !important;
}

我认为,即使我知道这在技术上是可能的,如果我只想更具体地说,这可能会凌驾于它之上。

而且,我不想利用联合材料来推翻它。

最佳回答

我不是主席,而是说“态度”。

我始终知道,你可以完全采用你概述的方法,在案卷中超越行文风格。 例如,该url确切解释说,程序:

问题回答

Don t overexaggerate using !important . 你们看到了后果。 你们通常以合理的方式很好地安排了你们的挑选者。 <代码>! 进口只应在特殊情况下使用。 然后,你与选择人打交道,这些问题突然比网上风格更具体。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签