Tailwind doesn't take the margin and padding to specific position [closed] - css

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed last month.
Improve this question
I've been facing this issue with tailwind. In some contexts it's impossibile to add padding or margin to specific sides.
Note: This is a React application. So maybe I'm missing some configuration.

In your tailwind config you must make sure that the component is in a folder listed under the content glob rules below. Hope that helps!
module.exports = {
content: [
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
"./scr/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
};

Related

I have a CSS specificity [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
This is my html code
This is my css code
When in CSS I write the CSS code for .keys class like this and add class .transistionOfKeys to html then my border properties does not add to it
But when I change my CSS code to this by removing .container and just keeping it to .keys then it works
after changing CSS code
So I want to know reason for this...
Hope someone answer this question soon...
Change the selector for the second rule to .container .transistionOfKeys {...} to achieve the same CSS specifity as the first CSS rule.

How to call CSS class directly without full hierarchy? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have CSS class in use that has path
.override .sidebar label.firstheading
I'm trying to create style guide and use the same class in it as showcase, but style guide doesn't have sidebar element. Can I call ".override .sidebar label.firstheading" directly in class="" without full hierarchy?
If I add .sidebar element leading to it in style guide, it gets so much formatting from .sidebar that it messes the whole page up.
Your styling should always be as less specific as possible! You should have a basic styling for label specialized label.firstheading and if the structure is important for the label you should add more specifity (.sidebar label {} and/or .sidebar label.firstheading {...}).
If you follow this scheme you will be able to override styles and to use your html more modular.
In other words: you should reorganize the styling for the label.firstheading component

Why one CSS class overrides other? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am working on a Vue.js project that uses Vuetify and vue-flash-message. I am trying to set warning message background to 'blueviolet' by editing its style:
.flash__message.warning {
color: #ffffff;
background-color: blueviolet;
border-color: #ef9e3b;
}
but there is '.warning' class in Vuetify that overrides it, see the screenshot .
I wonder if anyone can explain what technique is used here. And what is the right way to make the message background 'blueviolet' in this situation?
The issue here is your second class which is telling the browser to set the background to yellow as the !important tag on the end of each property. !important tells the browser to override any other styles that overlap classes. You need to:
A) Remove the important from the yellow styles and apply them to the purple
B) Remove the yellow styles all together.
Option A will seem more 'logical' but it depends what environment your working in and how your code etiquette applies to your project. I prefer to keep everything simple and just remove the intrusive css and try and use less !importants in web projects.
For more information on the !important utility visit this helpful blog post: !Important Utility information
Hope this helps.

I want to remove this image [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
How can i remove this image:
Image <--
Link: infinitefun20.blogspot.gr
when you want to use css, just say with element has wich display property :
ypu can use browser inspect to see yor element has wich class name
.post-avatar {
display: none;
}
Removing the Image from blog will require to check the code where its coming out from. So better will be to use CSS and hide it.
use this:-
.post-avatar{
display:none;
}

Textbox color does not persist on focus [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I have created css button style as here: http://jsfiddle.net/karimkhan/SgTy2/
When I used same css insite <style> in my page then it's effect changed. looks like below:
Actual css on fiddle gives this kind of view:
I am not good at css. What's wrong I am doing here?
What if you make an external css file? The same will probably happen, so see what styles are overlapping your element in inspector mode. I would not suggest to use !important, but rather make the style have more priority. One way to do this is to make your css selector more specific.
For example:
input[name="url"]
{
background: black;
}
has more priority as
input
{
background: red;
}
jsFiddle
Note that a more specifc path also takes longer to determ.
Hope you can work on a solution now.

Resources