Editing
MycoTaxa:Village pump (technical)/Archive 1
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== overriding class="wikitables" == I need to override the wikitables class. Specifically, I need to replace its charming #f2f2f2 table header with another color. I tried adding <code>style="background:red;"</code> to the header to the header row but it seems that the wikitables class takes precedence over my customized style. So how can I override the wikitables class? -- [[User talk:Miborovsky|Миборовский]] 05:14, 21 August 2007 (UTC) :Put "class" before "style" so that it overrides properly. Anything more, and I'd need to see an example of what you're trying to do (you could set up a page in your userspace, for example). [[User:EVula|EVula]] <span style="color: #999;">// [[User talk:EVula|talk]] // [[User:EVula/admin|<span style="color: #366;">☯</span>]] //</span> 05:17, 21 August 2007 (UTC) ::Order of class and style attributes on an element should not matter. [[User:Anomie|Anomie]] 14:02, 21 August 2007 (UTC) :::Yes, it should; the "C" of "[[Cascading Style Sheets|CSS]]" is cascading. Declarations that are made first are overridden by later declarations (ie: if Sheet X says that h2 tags should be green, and Sheet Z says h2 tags should be red, which ever sheet is included last will determine how it is displayed, but it can stille be overwritten by an inline style that says that ''that'' particular h2 tag should be blue). [[User:EVula|EVula]] <span style="color: #999;">// [[User talk:EVula|talk]] // [[User:EVula/admin|<span style="color: #366;">☯</span>]] //</span> 19:35, 21 August 2007 (UTC) ::::But if Sheet W says SPAN tags should be blue and an inline style says orange, <code><nowiki><span class="SheetW" style="color:orange"></nowiki></code> and <code><nowiki><span style="color:orange" class="SheetW"></nowiki></code> are equivalent (i.e. orange). Something similar goes for your example: <code><nowiki><h2 class="SheetX SheetZ"></nowiki></code> and <code><nowiki><h2 class="SheetZ SheetX"></nowiki></code> are equivalent. [[User:Anomie|Anomie]] 21:34, 21 August 2007 (UTC) :[[List of United States Supreme Court cases by the Marshall Court|Here]]'s an example. --[[User:MZMcBride|MZMcBride]] 06:43, 21 August 2007 (UTC) :If you look at [[MediaWiki:Common.css]], you will see that the background color is being applied to the TH elements. Thus, you will have to specify the style override on each cell rather than on the row. Unless there is a good reason (not just "I like it better in this color") for overriding the class, I would advise against doing this as it will prevent user preferences or skins from overriding the color. [[User:Anomie|Anomie]] 14:02, 21 August 2007 (UTC)
Summary:
Please note that all contributions to MycoTaxa may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
MycoTaxa:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Project page
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
In other projects