How to override CSS Background that already has !important?
Tags: css,stylish
Problem :
I am trying to override a website's background with Stylish but it isn't working. The background css for the website also has an !important, and it is overriding Stylish.
My code:
body {
background-image: none !important;
background: black !important;
}
Any help?
Solution :
You'll need to be more specific (quick guide to CSS specificity), for instance, using the >
selector:
body {
background-image: none !important;
background: black !important;
}
html > body {
background-image: none !important;
background: red !important;
}
CSS Howto..
The CSS specification spells this out definitively: Comments begin with the characters /* and end with the characters */. They may occur anywhere between tokens, and their contents have no...
For others having same question: It can be done by using stringByEvaluatingJavaScriptFromString: method of UIWebView (upon webViewDidFinishLoad) -(void)webViewDidFinishLoad:(UIWebView *)webView { [webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('topBarBody').remove();"]; } ...
You could do something like this: by combining selectors table.class1, table.class1 td { border: 1px solid black; border-collapse: collapse; } <table class="class1"> <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td>...
#one{ background-color:green; color:white; height:40px; } #two{ background-color:red; color:white; height:40px; display:in-line; } #one:hover + #two { display:none; } <div id="main"> <div id="one"> <p>Hover to hide div below</p> </div> <div id="two">...
You would not be able to achieve it using from and to in animations but you can use the percentage option like below: @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg);...
When you want to use the event object for event.currentTarget, you need to pass it to the callback function. like this: $(".btt").click(function(event) { The working code: $(".btt").click(function() { $(this).parent().parent().addClass("open"); });...
Giving white-space: nowrap to the body tag and display: inline-block to the div tag does the trick. Working Fiddle...
You can use a :pseudo-element to do this. div { position: relative; width: 300px; height: 75px; background: #B0B4FF; margin: 25px 0; } div:after { position: absolute; content: ''; width: 125px;...
Ok, I found the problem. It wasn`t in the code, my IE just automatically switched into Quirks mode. Changed it by going in the console (F12) and changed the Document...
Create a grey background image file and onclick change the background URL to point to the alternate image. Images cannot be manipulated by the host document. Think of SVG when...
You can use floated containers with centrally aligned images and text inside. When you reduce viewport size images that don't fit the new width will be shifted bellow. DEMO HTML:...
Since you can't prevent/hide the title attribute from showing on hover, just use a different attribute. A data-* attribute such as data-title would work. Just change the markup and the...
You can't reliably achieve what you want without removing the img from the contained parent. Your HTML would look like this: <img id="pic" src="http://static.stuff.co.nz/1357440924/872/8147872.jpg" /> <div id="wrapper"> <p>This is a...
As @Aditya Sethi said you need to override bootstrap css, but there is also a panel-heading image that needs to be removed. Wrap your panel-body div inside a below custom...
You'll need to set a height to the container and then you can hide the overflow of the nested font-awesome icon, using overflow:hidden. CSS: .clipped-alert{ overflow:hidden; height:55px; } HTML: <div...
Interesting. You can do something like that with JavaScript, of course: $(function(){ var p = $('p'); var words = p.text().split(' '); var text = ''; $.each(words, function(i, w){ if($.trim(w)) text...
<ons-list-item> sets a property min-height, which you need to overwrite. So something like that should work: <ons-list-item style="height:20px; min-height: 20px" > ...
This code works fine when i tried running. but still you should try using this. some versions of internet explorer do not support class nav or nav-bar please check hope...
Well things are pretty messy in your CSS so lets do it the right way, I;ve made an example from scratch Use a position: relative; container and wrap all the...
If you want to use the Modernizr, you can add the following custom test: Modernizr.testStyles( '#modernizr, x::-webkit-search-cancel-button { width: 9px; }', function(elem, rule){ Modernizr.addTest('search-reset', elem.offsetWidth == 9); }); See it...
Adding a class of step to each step element, I think this should meet your requirements: $('.step').click(function(){ $('.bold') .removeClass('bold'); $(this) .addClass('bold'); }); $('button').click(function(){ if( $('.bold').length < 1 ){ $('.step') .first()...
You could try using a border-left with transparent as the color and abandon the *-transform's altogether. This would require a CSS change but no additional HTML markup: Current Angle: #parallelogram...
Here's how to get precise centering without using the offset classes: Fiddle Demo Create a new helper class called col-centered: .col-centered { float: none; margin-right: auto; margin-left: auto; } Any...
You can use absolute positioning: <div style="height: 600px; position: relative;"> <div class="box" style="width: 30%; height: 70%; top: 0%; left: 0%;">1</div> <div class="box" style="width: 70%; height: 20%; top: 0%; left: 30%;">2</div>...
This is a sample which I have tried. try this. <head> <title>Search</title> <style> #searchcontrol { margin-LEFT:500PX; } </style> <script src="https://www.google.com/jsapi" type="text/javascript"></script> <script language="Javascript" type="text/javascript"> //<!...
You should read bootstrap documentation here: http://getbootstrap.com/css/ I'll recommend you to start by choosing what type of container your content will be using: normal one, or fluid (100% browser width)....
you can put new css file path like this: <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('template_directory'); ?>/css/newstyle.css" /> and you can remove default css path if you don't need. hope this...
You need to use css-loader when creating bundle with wepback. Install it: npm install css-loader --save-dev And add it to loaders in your webpack configs: module.exports = { module: {...
You have a option to move bottom using "legend" keyword. Update your options part like below. var options = { legend: 'bottom', title: 'Company Performance' }; FIDDLE DEMO...
see its css based select menu and you can customize it :- http://jsfiddle.net/XxkSC/553/ HTML <label class="custom-select"> <select> <option>Sushi</option> <option>Blue cheese with crackers</option> <option>Steak</option> <option>Other</option> </select>...