I am using the ASP.NET AJAX TabContainer control in a web application. I've placed images in the headers for each tab rather than using text - but the images are truncated b/c the default CSS for TabContainer states that the header is only 13px high:
.ajax__tab_xp .ajax__tab_header .ajax__tab_tab
{
height:13px;
padding:4px;
margin:0px;
background:url("tab.gif") repeat-x;
}
I have a CSS file I'm using and have added the following line to override that contained in the default CSS for TabContainer:
.ajax__tab_xp .ajax__tab_header .ajax__tab_tab
{
height:83px;
padding:4px;
margin:0px;
background:url("tab.gif") repeat-x;
}
But it is still using the default 13px, why?
You can see the default css file here: Default CSS File
Try using !important like this:
.ajax__tab_xp .ajax__tab_header .ajax__tab_tab
{
height:83px !important;
}
by the way, If you don't change other properties of the default class, you don't have to retype them...
After a lot of messing around, I got it working, though I'm not entirely sure what I did...
I think, I had to:
Manually add CssClass to ajaxToolkit:TabContainer, as even when setting it via the properties it didn't seem to generate.
I tried overriding the class ajax__tab_xp, but that didn't work, so I created a new class called ajax__custom and that worked. So my CSS in the end looked like:
.ajax__custom .ajax__tab_header .ajax__tab_tab
{
height: 100px;
}
Hope this helps someone else.
Dave,
I did the same thing. Copied Tab CSS and modified to my hearts content. Them I tried to disable tabs. This was working fine using default CSS. I thought something must be missing in my version. But checking generated source, it looks like TAB generates some js in page to enable/disable - Which, if we were permitted to to that on this project I would have gone with JQuery in the first place.
Save yourself some grief and use !Important to override default css if you dont want to go to javascript city.
I am having to modify some web forms, upgraded to bootstrap and suddenly I noticed that some pages had
So The class I see generated is
class="ajax__tab_xp"
Thus based on answers above , I found that 25px is all I need
.ajax__tab_xp .ajax__tab_header .ajax__tab_tab
{
height:25px !important;
}
That should work for others hopefully.
Related
I have an anomaly. So, I'm trying to edit\remove the background in the .site-header-main of my of a site. I edited via theme editor however, seems that such is not taking as the code is in the index file. Here is the website: https://retrocarsales.com/
Code in theme CSS after change via style.cc and\or theme editor:
.site-header-main, .site-description, .site-title-text a {
background: none;
}
.site-header-main {
border-bottom: none;
}
Code in (Index):258 when inspecting:
.site-header-main, .site-description, .site-title-text a {
background: #444444!important;
color: #ffffff!important;
}
.site-header-main {
border-bottom: 1px solid #444444!important;
}
NOTE: The code above is NOT found in Domain\WP-Content\Theme\index or in Domain\index I only find the related code in domain/wp-content/themes/theme-name/style.css in which there its good but its not executed on live site ... seems the site gets code from index not style.css
Thank You
You should never direct edit the theme's file if you are not a developer - this may be break your site or even make your site down if you make mistakes.
Instead of that, you can safely add your custom CSS by go to Appearance > Customize > Additional CSS (remember to add "!important" to overwrite current CSS rules).
See below image for more detail:
I'm using a video plugin for my wordpress site.
I want to change the width of the videos.
However it seems like I'm not using the correct path for the id, as I'm not seeing any changes from my css styling.
This is the info I have gotten from using the editor in chrome:
I want to change the inline styling, so I read I had to use !important to overrule it. But for testing I just used bg-color.
I have tried to access the video with these attempts with no success:
.vjs-tech {
background-color: red;
}
#player_html5_api.vjs-tech {
background-color: red;
}
#player_html5_api {
background-color: red;
}
video#player_html5_api {
background-color: red;
}
After a good chat with Gosi, I found the issue to be the video I wanted to be changed had its css located in another folder than the regular wordpress css folder, since it's a plugin. So I had to go in the plugins css folder and make my changes there.
For changing colors in some part of a WordPress theme, I've changed the background or color property of those elements (found using inspect in chrome) in style.css. But it is not changing in the theme.
I also tried making child theme of the theme. But no result.
For example, the style.css contains -
#header .nav_bg {
background: #7bae39;
margin-bottom: -30px;
padding: 5px;
}
I've changed it to -
#header .nav_bg {
background: #109DE4;
margin-bottom: -30px;
padding: 5px;
}
N.B: I've tried with SiteOrigin Custom CSS plugins, and it works with that. But I want to do it by changing CSS.
Thanks in Advance.
Use higher selector, element that contains that div or use
!Important before ;
Just add code to custome css in WordPress
If the same selector works with other plugins you might wanna try a few test to try to see what's going on.
Go the page and look for the style you just added on the
inspector. You can see by selecting the element if it is getting
applied and overridden by other css rule. In that case you can
update the rule to be more specific.
If the css is not showing up at all, you can try:
clearing your browser cache
check the page on incognito / a different browser
Hope it helps,
I am using Active Admin, is there a way to override CSS used by the active admin theme?
For eg:- I have to change css of submit button which is disabled to cursor: wait; and make it unclickable.
What's the best way to do this?
just make a new file
app/assets/stylesheets/active_admin.css.scss
and put your scss code there.
(Or just active_admin.css with css code)
You can override any CSS property by overriding the CSS class or IDs in you own stylesheet with !important attribute if you do not have any access to the original stylesheet
For example, use
.submit-button {
color: white !important;
}
to change the color of the submit button text.
It is easy to change the styles in Rails 4. Go to
app/assets/stylesheets/active_admin.css.scss
OR (depending upon where you have kept the file)
vendor/assets/stylesheets/active_admin.css.scss
and add styles in there.
I put my form classes in a container class to create a more specific reference. Like..
.form-container {
font-family: 'open-sans';
width: 420px;
.text-field-class {
input{border:none; border-bottom: 1px;}
}
}
this is working so far... for the most part. Better than important. Though maybe using an ID would be the more appropriate way.
My goal is to style a kendo-ui mobile app in Icenium to look the same on each device it's used on. Current targets include Android and IOS.
My stylesheet is the last link in the head section, to ensure that it overrides any other styles in the app. It hasn't helped, though, as telerik's specificity nightmare has me jumping through an insane number of hoops and getting very little accomplished.
I am at my wits end- I have followed the tutorial on http://www.icenium.com/mobile-app-platform/videos-demos/video/kendo-ui-mobile-and-icenium, and so far, have been able to override very few styles.
for instance:
.km-ios #tabstrip-scan .km-navbar
{
background-image:none;
}
should be all I need to override for the default ios titlebar, according to Telerik's tutorial. However, it gets rid of the background image, but leaves me with a background color, which it will not allow me to override (it also will not allow me to alter the text color). In other words:
.km-ios #tabstrip-scan .km-navbar
{
background-image:none; // works
background-color: #d9d1ba; //doesn't work
color: #333333; //doesn't work either
}
I have the same problems with their button classes:
.km-ios .km-button
{
height: 32px; // works
width: 100% // doesn't work;
background-image: none; // doesn't work
}
and with inputs:
.km-ios input[type=text]
{
width:100% // doesn't work
border-radius: 3px; // doesn't work
-webkit-border-radius: 3px // also doesn't work;
}
At one point, I even commented out the entire kendo default stylesheet, and was still getting the kendo default styles when I ran the app in the virtual machine.
How can I override the kendo-ui-mobile defaults and style the app how I want it to look (the same on every device), rather than how Telerik thinks it should look (closer to native ui)?
Force the platform to a specific one and style it with the Kendo UI Mobile ThemeBuilder here:
http://demos.kendoui.com/mobilethemebuilder/index.html
You might reference my post here Kendo mobile template styling/formatting not working - i was having a similar issue and my post might help.