Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
I'm trying to get contenteditable to work on a style element but it doesn't seem to be changing anything and the other styles dont seem to be being applied
<style contenteditable="true" style="display: block; width: 500px; height: 500px; border: 1px solid black;">
</style>
I tried this it's working.
<style contenteditable="true" style="display: block; width: 500px; height: 500px; border: 1px solid black;">
</style>
<div class="x"></div>
https://codepen.io/sefalette-1472316262/pen/KqxwVY
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I have an HTML section that I am trying to alter with CSS:
<section class="jumbo">
<div class="container">
<h1>THIS IS THE TEXT CONTAINED WITHIN THE JUMBO</h1>
</div>
</section>
However the changes I make in my CSS file, such as changing the color of the text contained in the element are not having any affect:
#jumbo {
background-image: url("../images/carbon.jpeg");
background-position: center center;
min-height: 200px;
text-align: center;
}
#jumbo h1 {
color: white;
font-size: 45px;
padding-top: 15px;
line-height: 1.6em;
}
Do you have any tips for how I can debug an issue like this?
You have to use .jumbo.
More about CSS selectors: https://www.w3schools.com/cssref/css_selectors.asp
#jumbo is an id selector
you should use a class selector
.jumbo and .jumbo h1
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
why background-image Don't work in div with class .milad
(i use bootstrap 4.3)
.milad {
width: 120px;
background-image: image-url('Untitled.png');
margin-top: 80px;
margin-left: 140px;
height: 120px;
}
<div class="milad"> </div>
your CSS property is wrong it should be url
example:
.milad {
width: 200px;
/*put path of your image file in the url */
/*background-image: url('Untitled.png'); */
background-image: url('https://placeimg.com/640/480/nature/grayscale');
margin-top: 80px;
margin-left: 140px;
height: 200px;
}
<div class="milad"> </div>
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
Please look at following html...
.wrapper {
position: relative;
}
.mydiv1 {
margin-left: -10px;
margin-top: -10px;
}
<div class="wrapper">
<div class="mydiv1">div1</div>
</div>
.mydiv1 was pulled left as 10px and through out it's parent's left border.
But nothing happens on its top.
Why did it work differently?
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
I have the following CSS:
body {
background-color: ffe750;
}
#background {
background-color: fc5f50;
}
In the html file I just have the div mentioned above, when I load the page, the colors aren't displaying (I got the Hex values from photoshop). I would just like to display two different colors on each half.
EDIT
Sorry for my ignorance, it was a very silly mistake, sadly I can't delete the question, very sorry.
You lack #:
body {
background-color: #ffe750;
}
#background {
position: fixed;
top: 0px;
left: 0px;
width: 50%;
height: 100%;
background-color: #fc5f50;
z-index: 1;
}
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I can't figure out what I am doing wrong here! probably something really obvious. I am trying to change the background colour and font colour of a div on mouse hover using purely CSS/HTML
HTML:
<div id="cta">
Learn More >
</div>
CSS:
#cta {
width: 65px;
border: 1px solid #183073;
border-radius: 5px;
background-color: white;
color: #183073;
font-family: Arial;
font-size: 10px;
padding: 5px;
}
#cta:hover {
background-color: #183073;
color: white;
}
Thanks in advance!
Try to set the z-index of #cta to something large like 99999. If it works like that it means that you have another element covering your div and preventing the hover.
:hover will work for element of type A across Browsers.
Some browsers do not allow :hover to any DOM object and restricted only to Anchor.
Similar isssue is solved in
Hover effects not working with IE8