How can I include a custom css stylesheet to some pages?
I have /wiki/Home_Page with standard css and Vector theme, but I'd like some page to have a different css file. Right now I'm editing Common.css like that:
.rootpage-Page1 {
background-image: url("...");
background-color: black;
color: white;
}
.rootpage-Page1 .gallerytextwrapper {
background-color: rgba(40,40,40,0.8) !important;
}
.rootpage-Page1 a {
color: lightblue;
}
.rootpage-Page2 {
background-image: url("...");
}
The CSS extension form the MediaWiki website doesn't works. I see the {{#css}} tags in my articles. It's mainly changing the colors of some stuff to fit the theme of the article and it's subpages.
TemplateStyles would be one option; it allows the use of a (relatively) safe, sanitized subset of CSS on wiki pages.
Related
I'm trying to make a single link in a WordPress top navigation menu that has a different background color but running into some issues.
What I have works on most of my pages but others not (as seen below). I assigned a CSS class (.contact-us-menu) to the individual menu item in the menu builder in WordPress, but I can seem to figure out how to get it to work across all the pages.
Wrong. (https://www.csolsinc.com/insights/)
Correct. (https://www.csolsinc.com/insights/webinars/)
This is the custom CSS I added with the "Wordpress Add Custom CSS" plugin.
li.contact-us-menu {
background-color:#f47e00!important;
height:50px!important;
border-radius:50px!important;
padding-right:15px;
color:#ffffff!important;
font-weight:bold!important;
vertical-align:middle;
}
li.contact-us-menu a {
color:#ffffff!important;
}
Any advice?
I looked through both of your site pages to look for the differences and I am seeing this line affecting the 'wrong' links:
#top-menu .menu-item .dropdown-toggle {
position: relative;
top: 11px !important;
For a fix, with your I would either change the top to -1px as in your 'correct'
or try to add:
li.contact-us-menu {
line-height: 50px;
}
to your css.
I am having a issue with the navbar on the child theme using the Mystile theme. When on a mobile phone the nav bar turns into a square box that you click on to acess the navbar, for some reason it appears ontop of the logo, I just can't figure out or get any CSS to make it go to its own line. I am hoping someone can help here.
Website: http://test.cyberglide.co.uk
Install Custom CSS plugin (asking you to install plugin because it overrides all other CSS) and insert this CSS. You can use other methods to override all other conflicting CSS sheets.
Be sure to include media queries for Mobile views.
#media only screen and (max-width:43.75em) {
#header #logo {
float: none;
display: block;
}
#header .nav-toggle {
position: relative !important;
display: inline;
}
}
I'm trying to add an arrow to the left hand side of my active link in my categories sidebar for my wordpress site I'm building.
I've already put in the css for it to behave the way I'd like it, I've added a small change in colour just so I know it's working well.
I've attempted to add a background image with a small .png file and tried various CSS styling to get it how I want it but I've had no luck even showing the image.
I'm open to using the character such as "➤" or the like if I cannot use a background image, maybe I might be missing something.
http://94.23.211.70/~cewp/product-category/cushions/
The above my my URL that will go directly to the page you're wanting to see along with a link already highlighted on the sidebar.
Here is the css that is making this active:
.product-categories .current-cat a {
color: #000033;
background-image: url("images/ICONNAMEHERE.png");
}
Hopefully this is enough information to provide, anymore then just ask me.
Regards
You can achieve this by css and font awesome. First add font awesome to your project. You can also use unicode charecters instead.
.widget_product_categories li { margin-left: 2.5em; }
.widget_product_categories li:before {
display: block;
float: left;
margin-left: -2.5em;
font-family: 'fontawesome';
font-size: 14px;
content: "\f054";
}
if not interested in adding font awesome content:url("images/ICONNAMEHERE.png");
I have a PHP script that pulls an RSS feed. The script pulls the article and sets it as a variable:
$page .= "<br><span class='rssdesc'>$description</span>";
I can change the size of images in an article with the following CSS:
.rssdesc img {
width: 50px;
height: 50px;
}
This works fine. However I cannot seem to style the text of the article. I assumed this would be accomplished like this:
.rssdesc {
font-size:9px;
color: #0094DE;
}
But for some reason it doesn’t work. I have tried using !important and .rssdesc font
but still nothing. Any ideas would be greatly appreciated.
Update I can also style links in an article using the following:
.rssdesc a:link {
color: #0094DE;
font-size:9px;
text-decoration: none;
It turns out that the tables in the RSS feed was responsible setting the font properties. I was able to override this in the CSS using the following:
.rssdesc table td {
color: #c02537;
font-size:9px;
}
Im trying to implement a more accurate h tag structure on my opencart site for seo purposes. For those that are unfamiliar with the html in opencart, most pages are split with php calls being made to seperate header, main body and footer files. I want to have a h1 tag that is slightly different on the main page to the product page by writing internal css to change the font size to something slightly smaller.
I therefore added the code (below) to the top of the products page which seems to work but leaves a massive white space at the bottom of the page below the footer. Example at this link: http://www.imbued.co.uk/sleep/aborro-bed
How do i implement this using css correctly?
<style>
h1 {
font-size:2em !important;
margin:0 0 20px !important
}
</style>
Try this:
"h1" on main page:
#content-home h1 {
font-size: 2em;
color: red;
}
"h1" on product page:
.product-info h1 {
font-size: 1em;
color: green;
}