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

17
votes
2answers
464 views

Is it ever okay to include inline CSS in plugins?

Normally in a plugin I would add styles using wp_enqueue_style. However, I am currently creating a plugin that only needs a few lines of CSS and I am wondering if it might be better to serve the ...
16
votes
5answers
6k 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 ...
12
votes
4answers
7k 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 ...
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 ...
11
votes
4answers
1k 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: ...
10
votes
9answers
4k 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 ...
10
votes
5answers
8k 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 ...
10
votes
7answers
7k views

How do you avoid caching during development?

Is there a simple way do prevent all caching when testing the appearance of changes to the site? I use WP Super Cache. I can delete its cache using the option provided, delete the cache for my ...
9
votes
4answers
178 views

This CSS Stuffing Works, But Is This A Good Practice?

I am trying to include a dynamic css in my plugin, I have been searching anywhere but doesn't find any case that is similar to what I do. And what I use to do it is by adding a css file directly into ...
9
votes
1answer
1k 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 ...
8
votes
4answers
4k views

Remove Open Sans from Twenty Twelve theme

I´m creating a child theme for Twenty Twelve v1.0 and I want to remove the Open Sans font. Open Sans is added in Twenty Twelve´s functions.php: wp_enqueue_style( 'twentytwelve-fonts', ...
7
votes
3answers
383 views

How can I target WordPress 3.8 new interface MP6 with CSS?

When MP6 was a plugin in WordPress 3.6+ it changes the body class of the admin and added an "admin-mp6" class which helps me to style my plugin accordingly. Now with the latest Alpha of WordPress 3.8 ...
7
votes
4answers
3k 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 ...
7
votes
1answer
2k 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, ...
7
votes
1answer
536 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 ...
6
votes
6answers
450 views

How can I test how fast or slow my wordpress website it?

I have my FIRST wordpress website and I love it, however I'm not sure if it's my browser (Firefox 8.0.1 for Mac) or my computer or the website itself but it's going really slow. MY SITE is in the ...
6
votes
3answers
1k views

CSS classes for theme

Does anybody know predefined (suggested by WP) CSS classes which should I use in my theme? I have seen somewhere in Internet a list of all CSS classes, which are used in WP theme, but can't find it. ...
6
votes
5answers
377 views

How to Handle CSS Organization

I notice not many people have downloaded the plugin Combine CSS. Without it, I don't know of a better way to automatically combine CSS files. I was wondering, are 99% of the developers using ...
6
votes
1answer
2k 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
1answer
868 views

Wordpress Admin Bar pushed Sticky Footer off the bottom of the page

I've implemented Ryan Fait's oh-so-common sticky footer in a custom Wordpress theme. I've noticed now if I implement the Wordpress Admin Bar into my pages, which is 28px high (in current Wordpress ...
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?
5
votes
6answers
1k views

Cache busting CSS files other than style.css

All right, so we're probably all familiar with the typical way to ensure that your main CSS file is refreshed when you load the page (busting the browser cache), right? <link rel="stylesheet" ...
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 ...
5
votes
2answers
539 views

Are the wordpress Core css styles really all nessasary?

On WordPress Codex there are this CSS styles listed, its a quite big list of styles but it seems they are doubled unnecessary. It says: Each Theme should have these or similar styles in its ...
5
votes
3answers
642 views

Splitting WordPress theme CSS into multiple files, good or bad?

I'm developing a WordPress theme framework. I want organize CSS for each section into separate files for the following reasons. Developers can easily deregister styles by parent theme and load their ...
5
votes
3answers
328 views

How to make a theme with more than one CSS file?

I've made my first theme and now I want to create different "profiles". These profiles are just independent CSS files that user can try. The point is, how to make these files to allow users to choose ...
5
votes
1answer
1k views

How to add sub-menu to a menu generated by wp_nav_menu by using plugin

I have a menu generated by wp_nav_menu which look like <ul class="nav-menu" id="menu-top-nav"> <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-43" ...
5
votes
3answers
1k views

How to fix admin stylesheet muck-up? [closed]

I have no idea what's going on here.. running the latest version, just logged in and I find my admin area looking like this: To me it looks like it's missing some/many styles and in load-styles.php ...
4
votes
1answer
615 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' ); }); ...
4
votes
5answers
2k views

I want to remove top admin bar from wordpress. How to?

whenever admin or any other user logs in a top bar menu ads up. Now I made login for everybody, so I do not want this bar. first I added display:none to admin-bar.css, but the main problem is that ...
4
votes
2answers
182 views

Why I can't add a CSS style in this WordPress theme?

I am trying to add a CSS style to a WordPress theme that I am developing as is shown in this tutorial: http://www.wpbeginner.com/wp-tutorials/how-to-properly-add-javascripts-and-styles-in-wordpress/ ...
4
votes
1answer
2k 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 ...
4
votes
2answers
1k 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 ...
4
votes
1answer
747 views

Automatically decrease font size for long words

I am working on an e-commerce site in which post and product titles will need to be displayed in fairly narrow divs. I would like to set a specific font size for words which can naturally fit in the ...
4
votes
2answers
3k views

SSL Breaks Wordpress CSS

We purchased an SSL certificat from network solutions (would never recommend them to my worst enemy, btw). Apparently it's activated... did a few checks that says it's activated for our domain. But ...
3
votes
1answer
394 views

Using tabs for wordpress plugin

Done my research and found this is how to call the built-in ui tabs jquery script in wp for the admin area but I'm stuck on implementing the other jquery scripts needed that I believe are built into ...
3
votes
2answers
184 views

Changing title to lowercase [closed]

Lets say i have 100 posts. And i would like to lowercase the title. but only 70 of it. I cant use text-transform or mb_strtolower. Is there anyway to download posts and lowercase the title with ...
3
votes
2answers
4k 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 ...
3
votes
4answers
471 views

Suggestions for creative use of post format feature, or themes that use them well

I'm looking for themes or examples of sites that use the post format feature in an interesting way. I suppose adding special styling for each post format would be a good start. But if anyone knows ...
3
votes
4answers
4k views

Custom per-page sidebar widgets .. possible?

Let's say I'm doing a site about cars, and in the main content area of a Page (using a certain template), there are a few paragraphs about a particular car. In the sidebar, are several standard ...
3
votes
2answers
783 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 ...
3
votes
1answer
396 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. ...
3
votes
1answer
238 views

Why max-width:97.5% on content images?

Is there a specific reason why we can find max-width:97.5% instead of 100% in common themes such as Twenty Eleven?
3
votes
2answers
516 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 ...
3
votes
1answer
415 views

Understanding wp_add_inline_style

I am trying to get my head round the wp_add_inline_style() function in WordPress. //setting inline css. function my_styles_method() { wp_enqueue_style( 'custom-style', ...
3
votes
1answer
56 views

Width 100%: Aspect ratio of image

If I add an image to a post, WordPress hardcodes width and height attributes to the img tag. I added max-width:100% to my CSS, but of course, if my browser window gets smaller, the resized image ...
3
votes
1answer
159 views

Assign title-specific class to list items in menu based on WP pages

I'm currently using a WP-generated list of pages for my site navigation - this is using the method wp_page_menu. I'd like to add custom styling to specfic list items in the menu, and I was wondering ...
3
votes
3answers
297 views

How to wrap admin menus and menu headers in additional divs without modifying the WordPress core?

I need to do this to enable advanced styling options via css, the one a class the headers are wrapped in isn't adequate to do the type of styling needed. Thanks!
3
votes
1answer
342 views

Setting up partial Right-to-Left admin interface

I am building a custom theme WordPress instance, which needs to be Arabic at the public face and English on Admin site, but with RTL (flush right) in editing fields. My theme takes care of the public ...
3
votes
1answer
494 views

How to combine multiple CSS files and concatenate JavaScripts if WordPress recommends enqueuing them?

How would I go about combining multiple CSS files and concatenating my scripts if they're being enqueued as WordPress recommends? My site is pretty slow and would like to optimize for performance.