Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the look and formatting) of HTML output, usually via Themes. When you have to use this tag, then there's a high chance that your question is off topic on this SE network site.

learn more… | top users | synonyms

11
votes
1answer
2k views

How can I use WordPress functions in my stylesheet?

I have my style.php file looking like this. <?php header('Content-Type: text/css');?> #div{ background:<?php echo get_option('bgcolor');?>; } This does not work, but when I do ...
12
votes
3answers
2k views

Customizing a WordPress theme without changing it?

I have found and downloaded a theme. However I want to tweak the CSS some to change the design, colours etc. a bit. How should I go about doing this, while still being able to update the theme without ...
13
votes
4answers
8k views

How do I add CSS options to my plugin without using inline styles?

I recently released a plugin, WP Coda Slider, that uses shortcodes to add a jQuery slider to any post or page. I am adding an options page in the next version and I would like to include some CSS ...
15
votes
5answers
12k views

best way to overide plugin CSS?

currently, I use CSS specificity to override plugin styles. I prefer this to editing the plugin as it makes for less headaches when you update. What would be nice is if my style sheet loaded after ...
5
votes
1answer
2k views

Enqueue a stylesheet for login page and make it appear in head element

I try to style the login page in my theme. Very simple: add_action( 'login_enqueue_scripts', function() { wp_enqueue_style( 'TEST', get_template_directory_uri() . '/css/login.css' ); }); ...
7
votes
1answer
3k views

Restricting a Plugin to Only Load its CSS and JS on Selected Pages?

I'd like to cause a plugin to restrict its loading of CSS stylesheets and JavaScript JS files to only those pages for which they are needed. An example for my question is the plugin Contact Form 7 ...
6
votes
2answers
6k views

How do I load a CSS style into WordPress admin area only?

I'm trying to load a CSS file for my WordPress post area, but having no luck. I have read over the wp_enqueue_style function and came up with the code below, but it doesn't load up. Is there a tag or ...
15
votes
4answers
2k views

Could the WP script/style loader be used to concatenate and gzip scripts and styles in the front-end?

WP has a nice javascript loader included in wp-admin: http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/load-scripts.php and a CSS loader: ...
3
votes
2answers
837 views

Modify CSS via Theme Control Panel

Hi to all I'm trying to create an advanced control panel for my first Wordpress template but I'm not able to add a function that I will need. The function that I'm trying to add is the possibility to ...
0
votes
2answers
176 views

How to link to a alternative page in CSS

I have a wordpress site and I want to be able to completely change a page that is displayed based on the browser size in my Custom CSS, so that if it is over 1500 pixels it loads a completely ...
-1
votes
2answers
1k views

Changing CSS in Twenty Eleven to change font size of body text

How do I alter the CSS of Twenty Eleven so that all the body text in posts and on pages is bigger? And is the change I make for this in the files on my server, or through the browser in the Admin ...
10
votes
9answers
5k views

Adding first / last CSS classes to menus

is that possible, without javascript hacks? like this: <ul class="my_menu"> <li class="first"> ... </li> <li> ... </li> <li> ... </li> <li ...
3
votes
2answers
550 views

Add a preview to a Wordpress Control Panel

I'm trying to create a new wordpress template and inside it I added a Control Panel, inside this control panel there is an option that allows user to choose where he want's to place a on a map, I try ...
6
votes
1answer
4k views

How to enqueue style before style.css

How do I enqueue a .css file before style.css is loaded? Or make the default style.css dependant on another .css file? I'm trying to load a .css reset, which style.css would overwrite. Here's what I ...
5
votes
2answers
3k views

How to customize the default HTML for Wordpress Attachments

I'm using Wordpress 3.0.1 (most recent as of now) and working around the Whiteboard theme. It seems that for attachments (images, specifically), Wordpress generates the HTML automatically and it ...
3
votes
1answer
7k views

TinyMCE: adding CSS to format dropdown

I successfully added a TinyMCE stylesheet using add_editor_style() so that I can preview the styles in the body of the TinyMCE editor. However, am I right in assuming that the add_editor_style() ...
2
votes
2answers
286 views

Add class to before_widget for all widgets with a dropdown and a counter

Some predefined widgets offer the option to use a select element (dropdown) and/or a counter after each entry. How can I add the CSS classes widget-with-dropdown or widget-with-counters to these ...
2
votes
2answers
939 views

wp_tag_cloud inline CSS

I am using wp_tag_cloud but my problem is the inline CSS (for the font-size). I am doing RWD so I need full control of my markup/css. As I saw there is no property that will make it go away, so I ...
1
vote
6answers
3k views

How to start learning CSS and theme development?

What would be your suggestions for learning CSS and WordPress theme development ? I have been using WordPress for over 4 years now, but I have never really gotten comfortable with CSS or theme design ...
0
votes
1answer
2k views

How to style a specific nav menu item?

I have a site, which now have a new registration form and I want to highlight it by blinking the menu item. you can see the site here. I wan to blink "Registration for seminar" item. I am using ...
-2
votes
2answers
2k views

PageLines theme: how to change the background color of the main content vs. entire page?

I use PageLines free version, with WordPress 3.3.1, for this website: http://new.teleosis.org/?page_id=76 I want the background color of the whole page to be light green, and the background color of ...
3
votes
1answer
438 views

How to apply a class to the second word in menu list item?

I want to apply a class to a word in my menu. For example, say I have a list item in my menu called "My Item". I would like to apply a class to the word "Item" so that I can style it anyway I want. ...
1
vote
1answer
327 views

Adding dashicon fonts to the admin of pre 3.8 installs

I've started using the dashicon fonts in my theme options page for WP 3.8+ users. To take care of users on < 3.8, I've added the dashicon fonts to my theme folder and also an entry at the top of my ...
1
vote
1answer
133 views

Big side banners

I would like to have a big header side advertisements like this: What is the best way to achieve that?
17
votes
5answers
10k views

What are the standard admin CSS id/class tags?

Is there a list of WordPress CSS id/classes that i can use to build plugin option screens that look and feel more like a normal WordPress option page? i have found some through serendipity but it ...
10
votes
4answers
4k views

Solutions for generating dynamic javascript / CSS

Let's say you need to generate javascript or CSS code that depends on the current context. For example you have a form on the homepage that fires an ajax request on submit, and a different form on ...
2
votes
3answers
3k views

Customizing wp-activate.php

Does anyone know how I can customise wp-activate.php? It wraps the content in <div id="content" class="widecolumn">, however in my theme the main wrapper is <div id="main"> Presumably, I ...
1
vote
3answers
2k views

Best way to inject css into admin_head in plugins?

I'm looking for the best way to inject CSS into WordPress' Admin CP. Currently, I'm using the admin_head action hook and in this hook, I'm using dirname( __FILE__ ) to retrieve the directory for the ...
7
votes
1answer
3k views

wp_enqueue_scripts, wp_register_scripts, wp_print_scripts: i'm confused

I've been reading up a bit on this subject, but the more I read - the more confused I get. Can someone explain to me in short what's the exact difference between wp_enqueue_scripts, ...
1
vote
3answers
654 views

Override CSS settings of plugins

I want to override my plugin CSS settings, but I can't do that in my style.css file, because the plugin CSS gets loaded after. Is there a way of getting style to be applied to override plugin CSS?
1
vote
3answers
1k views

Best approach for loading a sidebar Only if the screen max-width is >900px?

I have been playing around with media queries quite a bit lately and I love the concept. It is so easy to display images or change div floats depending upon what the users screen max-width is. I'm ...
7
votes
1answer
591 views

Assign a Class to the Current “Tag” for Formatting

Essentially what I am hoping to replicate is something like the "current-menu-item" class that is applied to WP Menus. My client is wanting to use Tags as a sub-nav, and I've managed to get the tags ...
5
votes
2answers
3k views

How to add a “last” class to the last post in loop.php?

I need to add a "last" class to the last post that appears in loop.php. Can someone tell me how to accomplish this?
4
votes
2answers
2k views

Forcing reload of editor-style.css

Is there a method to force the refresh of editor-style.css, when I change manually the stylesheet for the TinyMCE editor? Modification doesn't show immediately but they will be cached in the admin ...
2
votes
2answers
1k views

Twitter Bootstrap Use Collapse in Custom Post Type

I am using Bootstrap with Wordpress and I want to implement the collapse functionality in the content for single pages of a specific custom post type. I know I could create a shortcode, however, ...
2
votes
2answers
2k views

how to make stylesheet appear in theme editor?

I have a stylesheet in my theme in the css subdir of the theme dir (css/style.css). The question is how to make this .css file appear in the theme editor of the WordPress admin. (I know using the web ...
1
vote
2answers
1k views

wp enqueue style and style sheet depth

How could I add a style sheet at the bottom of the <head> tag, so if there´s a need to override some other styles added before, it will override. I heard something about wp_enqueue_style, and ...
1
vote
1answer
122 views

IE and WordPress

I'm developing a WordPress based website. Using latest version of WordPress and Genesis theme. I've to use a seperate stylesheet for IE, how can I add that? Sorry for this silly question, I'm new in ...
1
vote
1answer
2k views

Include CSS with PHP without including wp-load?

I have a CSS-file generated from PHP. In my file it says... header("Content-type: text/css"); define('WP_USE_THEMES', false); include '../../../../wp-load.php'; I've read that including ...
0
votes
1answer
29 views

Is it possible to be more page/post specific with admin_enqueue_script?

I am using this code to load a stylesheet in the admin, but only on post.php related pages: function my_enqueue_for_post_pages_only($hook) { if( 'post.php' != $hook ) return; ...
0
votes
1answer
3k views

How do I register/enqueue a custom CSS file?

Good Day. I am using a Wordpress theme and I want to add my own custom CSS. Now I have tried adding my own separate stylesheet after all the other php stylesheet calls in the header.php file. I tried ...
0
votes
3answers
4k views

Why won't child theme's style.css override plugin's css

I am using my own child theme for twentyeleven, and I've made some changes to some plugin's css classes in my child style.css. The problem I'm having is that if I add a new css attribute to a class ...
0
votes
1answer
2k views

Using theme options to change link colours

I'm developing a WordPress theme with some theme options (using the ThemeShaper sample theme options page), and one of the options I want is to allow users to set their own link colours. At the ...
-2
votes
2answers
134 views

How do I add Javascript and CSS files into WordPress?

I have the following html code: <script src="js/jquery.vmap.js"></script> <script src="js/jquery.vmap.world.js"></script> <script ...
4
votes
2answers
855 views

Versioning @import of parent theme's style.css

Context I built a child theme based on Twenty Thirteen which works quite well. After updating the parent theme to version 1.3, I noticed strange behavior with the styling which was caused by a cached ...
2
votes
2answers
298 views

How to set two different themes on one WordPress? (Desktop vs. Mobile)

I created two WordPress themes. First for the Desktop and second for tablet/mobile. I want to set on one URL. When the website opens, the theme should change automatically based on resolution.
2
votes
2answers
3k views

How to conditionally enqueue a stylesheet only for a certain page(s)?

Before I get started, I want to acknowledge that there are some really good articles that are targeted at how to conditionally enqueue scripts based on page/post content. WordPress Plugin ...
1
vote
2answers
197 views

WordPress Displaying Thumbnails Vertically

WordPress is displaying my thumbnails vertically and VERY LARGE. Specifically it's displaying WooCommerce product page thumbnails vertically and VERY LARGE. Can't seem to figure out why or what piece ...
1
vote
3answers
183 views

To enqueue or not to enqueue

What is the best way to link to a CSS file in WordPress? Method 1: Use the following whenever needed <link href="<?php echo get_template_directory_uri(); ?>/my-style.css" rel="stylesheet" ...
1
vote
1answer
768 views

CSS for Custom Post Types

How do I assign CSS to custom post types so it displays different from other Custom Post Types? Example: Custom Post Type 1: Row of 4 Images Custom Post Type 2: a 2 column with an Image in the ...