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 3 years ago.
Improve this question
i have a listing html page, in which the first div background color will be white and the second grey color. i have used the following css
.aamir {
background: #fff;
width: 1000px;
margin: 0 auto;
text-align: left;
padding: 20px;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.05);
height: 45px;
margin-bottom: 3px;
border-radius: 1px;
}
div:nth-child(even) {
background: #fafafa
}
the problem is when i am using the class name like
.aamir:nth-child(even)
its not working. when i am using
div:nth-child(even)
its working fine. can anyone please tell me why i cannot give it my class. thanks in advance.
Firstly, i think your CSS selector is incorrect. You would need to do the following (note, the starting period):
.aamir:nth-child(even) {
background: #fafafa
}
Second, i think you might be suffering because of the specificity. You can try the below CSS to get around it. This will make it more specific than the original selector by using the element type as well as the class. If your element type is not a div, change the CSS to match the element type.
div.aamir:nth-child(even) {
background: #fafafa
}
You can find out more about specificity at: https://www.w3schools.com/css/css_specificity.asp
Make sure not to forget to add a dot before aamir.
.aamir:nth-child(even) {
background: #fafafa;
}
Related
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 3 years ago.
Improve this question
is there a way to decrease the footer height? I have been playing with the style.css, but did not make it. I would need the footer height as small as possible. Can anyone help?
My client is asking he want full width slider in home page without scroll bar and he is asking footer is also visible in home page like sticky footer without scroll. I tried but its not working. please save me out from this.
website is in wordpress
This is my website url: http://f9interiors.com/
Thanks for your suggestions.
Update following css. you change padding as per your requirement.
.copyright-wrapper {
background-color: rgba(13, 9, 0, 0.4);
position: relative;
padding: 5px 0;
}
.copyright-wrapper .container{
display: inline-block;
}
.copyright-wrapper {
background-color: rgba(13, 9, 0, 0.4);
position: relative;
padding: 0px 0px 20px 0px;
line-height: 15px
}
.copyright-wrapper .container{
display: inline-block;
}
apply that css
section#home_slider {
height: calc(100vh - 65px);
overflow: hidden;
}
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 3 years ago.
Improve this question
I need to change the submit button style of contact form 7. https://www.narwal.shop/contact-us/
Change background colour
Add border radius 2 px
Add hover white background colour, black font and black border
Normaly I find the source and edit the CSS file, however this no impact. Do you know which file I have to edit?
Click here for example
Change this
input#cntctbttn {
color: rgb(255, 255, 255);
background-color: red;
border-radius: 2px;
}
and add it in appearance -> style editor(style.css))
The style-settings from #cntctbttn seems to overwrite yours. Just search in the project for #cntctbttnand comment it out or remove it.
Put this code inside your css file:
.wpcf7-submit:hover {
color: black !important;
background: white !important;
border: 1px solid !important;
}
Definitely it will work.
insert id for the submit button then use the code below:
input#id {
border: 1px solid #000000;
background: #caf1ff;
color: #ffffff;
border-radius: 2px;
}
input#id:hover {
background: #ffffff;
color: #000000;
}
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
I want to bring my Sketch file to HTML/CSS in the browser.
How can I implement the white line just between the small and big text, as shown in the image below?
If don't want to include any additional html element then you can use pseduo element:after.
h2:after {
display:block;
content:" ";
width: 80px;
height: 5px;
background: grey;
margin-top: 5px;
}
fiddle
You can add an empty div with a bottom border & custom width, which is of cleaner and shorter code:
body {
background-color: blue;
color: white;
}
#mydiv {
border-bottom: 4px solid white;
width: 33%;
}
#myline {
height: 4px;
background-color: white;
border: 0px solid black;
width: 33%;
}
A div:
<div id="mydiv"></div>
A horizontal line:
<hr id="myline" />
That's 4 lines for the HR and 2 for the div, and that's without making the hr align to the left.
If you don't want to add another element you can use ::after on any element - just make it have display: block and set the color, width, height etc. similar to the above code.
You can add tag <hr> and him specify needed width, height,color...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
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.
Closed 9 years ago.
Improve this question
Help! I've read every question here and every tutorial online… but I can't seem to make the left and right column bottom border appear on my layout that I'm trying to put together.
Here is a link where I am currently working on it.
Can anyone tell me what I am doing wrong?
My current css is:
.main-inner .fauxcolumn-left-outer .fauxcolumn-inner {
margin-right: 20px;
background: white url(http://i1109.photobucket.com/albums/h423/thesinglemomoirs/templates/pinkcupcake/38d73024.png) repeat scroll top left;
border: 2px solid black;
}
.fauxcolumn-outer .fauxborder-left, .fauxcolumn-outer .fauxborder-right, .fauxcolumn-inner {
height: 100%;
}
The solution to your problem is to set the box-sizing like so:
.fauxcolumn-inner {
box-sizing: border-box;
}
Your problem is that without box-sizing to border-box when you set your height to 100%:
.fauxcolumn-outer .fauxborder-left,
.fauxcolumn-outer .fauxborder-right,
.fauxcolumn-inner {
height: 100%
}
and THEN add margins, padding or borders, your true height ends up being greater than 100%
You could replace border with an inner box shadow with no blur:
box-shadow: inset 0 0 0 2px #000000;
.yourclass {
border-bottom:thick solid black;
}
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
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.
Closed 9 years ago.
Improve this question
If I'm honest I feel a bit stupid asking this question on here as the answer will most likely be very simple, but I'm currently at my wits end trying to find the solution.
I have two web pages which use identical code and the same style.css file but use different tags, allowing me to alter the colour of the menus, header on the page etc.
The following one is working correctly
http://www.dtlsports.co.uk/poolIndex.php
However on this one, the menu has lost its colour and shifted down incorrectly.
http://www.dtlsports.co.uk/squashIndex.php
Can anyone spot the difference between the two that will make one work and the other not? I assume you'll be able to inspect all the necessary stuff on the pages themselves, but if not just let me know and I'll put it all on here.
Thanks in advance!!
Looks like the second one is missing a display:block;
http://puu.sh/5arNI.jpg
you needed to add display:block
navQ {
background: -moz-linear-gradient(center top , #FFCC00, #FFCC00) repeat scroll 0 0 #FF0000;
border: 1px solid #FFCC00;
border-radius: 0.5em 0.5em 0.5em 0.5em;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
color: #FFCC00;
display: block;
height: 44px;
margin: -37px auto 0;
min-width: 800px;
}
you are missing the following CSS style
article, aside, figure, footer, header, hgroup, nav, navP, section {
display: block;
}