Questions tagged [css]

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.

Filter by
Sorted by
Tagged with
-1
votes
0answers
18 views

how to make custom dropdown “nice-select” [closed]

How to make this dropdown use nice-select javascript? I tried style it in css, but it doesn't seem to work. <script> (function($) { // create references to the 3 dropdown fields for ...
0
votes
0answers
13 views

Dynamically populated scss values or how to change styles by user choice

When building websites I use scss to write my stylesheet and gulp to put it together into style.css I know there is a way to dynamically populate the values in css using style.php instead.Is there a ...
0
votes
1answer
6 views

removing side space between para and container on generatepress?

There’s space between paragraphs and container when I open my website on a mobile device only. I want to reduce that space, how can I do that on generatepress theme on WordPress. this is the space I’m ...
0
votes
1answer
9 views

Menu items not clickable

Our website is chinesealpha.com All of a sudden, our menu items are non-clickable. Does any of you have an idea how to resolve this? I tried re-configuring the menu list, doens't work... Thanks in ...
3
votes
2answers
90 views
+50

How can I make the wordpress editor apply the selected template?

I wrote a WordPress theme for a non-profit where I use templates to style individual pages. I select the template for an individual page in the editor on the right: For styling of a template page, I ...
0
votes
0answers
17 views

CSS load order different when logged in [closed]

A friend is having a problem with their site and I am trying to fix it for them. The problem is that the header is not displaying correctly when you are not logged into wordpress, and it seems that ...
1
vote
1answer
25 views

removing my underline from hyperlinks

So I am new to Wordpress, on my website I recently opened the source code and am learning how to customize even more. One thing I am stuck on is how to remove underlines from hyperlink, I tried the ...
0
votes
0answers
10 views

Need to make sidebar responsive only when screen width is greater than 1024px

I'm new to WordPress and I want to make my sidebar responsive when the screen width is greater than 1024px. currently, the sidebar becomes responsive when the screen width is greater than 768px. The ...
0
votes
0answers
10 views

Get admin css with javascript?

I need to take the "wpadminbar" color and put it as a background color for the plugin header. If the admin changes the color scheme the header color on my plugin also changes. Of course I ...
0
votes
0answers
10 views

My css don't get applied on the costume widget

This is my CSS code: text-align: center; text-decoration: none; } div#grow:hover { -webkit-transform: scale(1.3); -ms-transform: scale(1.3); transform: scale(1.3); } ...
0
votes
2answers
32 views

Inline If statement to echo CSS [closed]

I have a line of code in my template I would like to add the css class "has-video" to if the post is within a certain category. I am trying to do this inline with ' . ( if (in_category(42)) ...
0
votes
2answers
38 views

Which is the correct way to conditionally enqueue a CSS file?

get_queried_object returns NULL inside a function hooked to wp_enqueue_scripts action hook when going to an nonexistent category URL on my website. If the category exists, the error is not shown and I ...
1
vote
0answers
25 views

How to include .css code in a WordPress page template?

I have set up a template on my Wordpress.org website that will apply some .css code to hide the header, footer and breadcrumbs on my landing pages. I've created a css folder in my child theme, created ...
1
vote
0answers
19 views

Which html elements should be styled in wordpress theme

At the Wordpress Codex said next: All possible HTML elements should be styled by your theme (unless it is a child theme), both in post/page content and in comment content. Tables, captions, images, ...
1
vote
2answers
23 views

Get different images for mobile and desktop with php, advanced custom fields without using js and ajax

I hope everyone is well! I am looking for a possibility to load different galleries, background images etc for the phone and desktop. For example, I set my hero background image like this: <...
0
votes
1answer
18 views

Why nav_menu_css_class doesn't work with apply_filters?

I was trying to add css class to nav items. The documented function call in WordPress docs was apply_filters( 'nav_menu_css_class', string[] $classes, WP_Post $item, stdClass $args, int $depth ) But ...
0
votes
0answers
13 views

Gap between Smart Slider 3 and Main Menu

I am using Smart Slider 3 on my wordpress site and there seems to be a white space between my slider and the content above/below the slider. I am looking to remove the white space.
0
votes
0answers
39 views

Why does theme's reset CSS have higher precedence of plugin's CSS?

In the style.css of the theme Twenty Twenty-One, there is a piece of reset CSS: /** * Reset specific elements to make them easier to style in other contexts. */ html, body, p, ol, ul, li, dl, dt, dd,...
-1
votes
1answer
30 views

add custom css on all page exept of one

OK, that was helpful. But I need it a bit more complicated. I need a script to add a custom css to all pages, exept on one. How can I do that?
1
vote
1answer
37 views

If post by specific role different css to everyone

So i have searched alot but cant find a solution. Every solution which i find is changing css only to that specific role not for everyone else. Basicly i want to do this: If user role contributor then ...
0
votes
0answers
10 views

The CSS file in the plugin changes, but the outcome doesn't change. Why is that?

I am making a test plugin that contains a test.css and a test.php file. Here is the test.php file: <?php /* Plugin Name: Site Plugin for Quảcầu.com Description: Site specific code changes for ...
0
votes
0answers
17 views

Does anyone know how to make text fade in when scrolling down, that doesn't require any plug-ins? [duplicate]

Purely just using css code on wp admin, can I make text fade in when I scroll through the page.
0
votes
1answer
27 views

How to add CSS via custom plugin?

I am making my first plugin. I create a folder in \wp-content\plugins, create a test.css and a test.php file. Here is my test.css: body { background-color: red !important; } Here is my test.php (...
0
votes
1answer
22 views

Implementing a simple slider in code?

Here's where I'm at. Have inserted this into a page's html code: <div id="stgSlideshow"> <div> <img src="https://staging.retrorigs.co.uk/wp-content/uploads/2021/...
0
votes
1answer
27 views

Overriding inline !important CSS with Javscript code snippet with media query

There's a piece of inline CSS code: <style type="text/css" id="illdy-about-section-css"> #header.header-front-page {background-image: url(image.png) !important;} #header....
1
vote
0answers
19 views

Responsive Author Style in BBpress?

I would like change responsive design author of forum section which I attached screenshots. I tried some of code but didn't worked. Here is the code #bbpress-forums li.bbp-body div.bbp-topic-author, ...
0
votes
0answers
13 views

Adding inline style to CPT admin backend

Let's say I have a custom post type that looks like this in my backend: How can I add some HTML inline style to the status column based on the content itself? For example, when the status content is ...
1
vote
0answers
11 views

Link theme options page using ACF to styles

Forgive me, I'm very much a beginner. I'm looking into custom theme development and creating a theme options page. Using the options page, I want to set a primary color that will be used across all ...
0
votes
2answers
18 views

Newbie wordpress question re banner height

I've been put in charge of making some modifications to a wordpress site, and one of the changes I need to make was to reduce the size of the banner on a particular page. I can see from the CSS that ...
0
votes
0answers
19 views

Adding a new block editor color option to a theme

I am trying to add new colors to my gutenberg color palette, I would like to add a red color, but when I add the following lines: array( 'name' => _x( 'Red', 'Name of the red color in the ...
0
votes
0answers
61 views

how to echo a background image in a custom post type

I've setup a loop for custom post type // The Query $the_query = new WP_Query( 'post_type=support_medewerkers&posts_per_page=1' ); // The Loop if ( $the_query->have_posts() ) { while ( $...
0
votes
0answers
15 views

WordPress site showing only text in browsers

My website started showing only text version in all browsers. I was removing unused css . In chrome browser it shows text version , but when refreshed it shows all the pictures . How I can find what ...
0
votes
0answers
7 views

Custom hero images for wordpress

How I can add custom hero images to my wordpress site. I have WPBakery plugin. Website is done and it uses old revolution slider 5 and I cant make similar hero slide like I needed. My css and html ...
0
votes
0answers
9 views

What is the best practice for setting CSS color picker styles from a plugin admin page?

I'm developing a plugin and I have a few CSS styles that I want to set based on selections on the plugin admin page. For instance, I have a color picker and based on the selected color I need to ...
0
votes
1answer
35 views

Understanding how the class family `inner-container` works

After changing the theme to Twenty Twenty-One, I have a bug with custom containers from various block plugins. In particular, custom blocks should have a class ending with inner-container (which I ...
0
votes
0answers
18 views

Stop custom Gutenberg styles taking over other admin bits?

Is there any classes or way of targeting CSS so custom Gutenberg styles doesn't take over the whole admin? For example i want p tag to reflect the front of site font-family and a links etc, but then ...
0
votes
0answers
42 views

Save custom option in CSS file

I have built this script in order to display a CodeMirror in a plugin and through the CodeMirror integration I can inject and save CSS in the head of the website, the result is very cool but I would ...
1
vote
1answer
23 views

How to override checkbox styles if these inputs have a unique id [closed]

I'm trying to override default input checkbox styles, but not good result. First of all these checkboxes and labels have unique ID. But if I try edit these checkboxes, no effect, because every ...
0
votes
0answers
31 views

Change CSS in functions.php

I wrote some code in my functions.php to make a blog title smaller when too long, but i would also like to target another css class called .slide-entry in my blog page. So in the first if statement, i ...
0
votes
0answers
9 views

Function to load custom style sheet

How would I write a function which creates a button on all page types to override the current style sheet for this page with another custom style sheet when set to on.
0
votes
1answer
17 views

How would you add sequentially numbered labels to images in posts?

I'd like to add sequentially numbered labels to images in posts. Just a small number in the corner of each image to help when referencing them in my writing. All of the images are wp-block-image (no ...
0
votes
1answer
19 views

Add core style in theme

I am creating a theme where I will display some pages The issue I have is that the WordPress editor is adding a lot of class, for example has-text-align-center The only solution I found is adding <?...
0
votes
0answers
38 views

broken internal JavaScript and CSS files

there is more pages like this when i try to open any page i cant see the products and the wp-includes is not in that place i dont know why they trying to access from that path https://moroccan-craft-...
0
votes
2answers
31 views

Use CSS tag inside PHP code

I'm trying to show/hide two lines of text depending on whether a WooCommerce category is empty or has any products in it. Those lines are inserted in text blocks using Elementor and I've assigned a ...
1
vote
0answers
13 views

How to tie dark mode with prefers-color-scheme webkit? [closed]

I implemented dark mode on my Wordpress website with the following code: //Create the cookie object var cookieStorage = { setCookie: function setCookie(key, value, time, path) { ...
1
vote
0answers
16 views

Custom CSS doesn't work in edit mode

I'm using Wordpress 5.6.1 with Twenty Twenty-One theme. I have added some additional CSS and it works fine for published posts. But it does not apply while I'm editing a post. In Chrome web ...
0
votes
0answers
47 views

avada woocommerce product details in grid

Using avada theme and woocommerce when the products are listed on page load, picture is over product text on first load. After reload it all aligns. Please refer to the picture below. Any suggestions ...
0
votes
0answers
28 views

Combine page types and Custom Taxonomy in a functions.php command

add_action( 'wp_head', function () { if ( is_tax('country') ) { ?> <style> @media (max-width: 768px) { .site-content { display: flex; flex-direction: column-reverse; ...
0
votes
2answers
19 views

Trying to load a responsive CSS media query using Custom Taxonmy

@media (max-width: 768px) { .page-id-9334 .site-content { display: flex; flex-direction: column-reverse; } } I am trying to load this CSS into Custom Taxonomy Pages... My original ...
0
votes
0answers
21 views

Web App on a Wordpress page?

I built a simple Web App using HTML CSS Javascript and a folder with a few images. Is it possible to display the app on a wordpress page? Would it also be possible to embed the app into a blog post? ...

1
2 3 4 5
52