Why does the ID "home-ad" not work on firefox? [closed] - html

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 6 years ago.
Improve this question
I am just doing a bit of css styling and ran into an issue. I was using the id "home-ad" and it would not display in Firefox. The box model would have the content size as 0x-40 (40 was the padding value). Once I changed the ID name, the code worked without issue.
I tested it in chrome, and the home-ad ID displayed without issue.
I am obviously just going to use a different ID from now on, but I am curious as to why it won't display.
Here's the JSFiddle
If you open it in both Firefox and Chrome, you'll see the different results.
HTML:
<div id="home-ad">
<p class="text-center">First Div</p>
</div>
<div id="home-advert">
<p class="text-center">Second Div</p>
</div>
CSS:
#home-ad {
background-color: #fff669;
}
#home-advert {
background-color: #fff669;
}

Yes, I'm on my work computer and it was due to the ad blocker that's installed.
Crisis averted.

Related

Why is my heading and text not appearing? [closed]

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 6 years ago.
Improve this question
I'm sure this is really simple, sorry but I'm a web noob. I can't get the headings to show up on the page.
<html>
<style>
body {
background: linear-gradient(to right, #bdc3c7, #2c3e50);
}
<style/>
<body>
<h1>That Was Then<h1/>
<p> A toronto based band <p>
<body/>
<html/>
The syntax for an end tag is </type> not <type/>.
This would have been picked up if you had used a validator.

Any way to write " *:nth-child(2) " in CSS? [closed]

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 7 years ago.
Improve this question
I need to hide the second child of a div (#parentDiv) irrespective of the html-tag p, h2, h3 or div.
I could write all possible combinations in CSS, but it seemed to be clumsy as the html-tag of the element here can vary and is unpredictable. So I suppose writing up all HTML-tags is not a good approach.
Hence I tried below generalized approach in CSS, but did not work.
#parentDiv *:nth-child(2) {
display: none;
}
I do not need a JavaScript solution.
The code looks good and fine.. Check for brackets. You may have forgot to close brackets.

Bold not working on a page but works on other pages and browsers [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 8 years ago.
Improve this question
I am trying to create a small description tile on a web page and i realized that bold ( tag) isn't causing the desired effect(or any effect at all) on a particular page. This is the code that I am using, which to my knowledge is correct:
<div class="w48 contentBox contentBoxBlue" style="margin:1%;margin:0 auto;">
<img style="width:25%;margin-bottom:5%;" src="styles/images/piggyWhite.png" />
<p class="tWhite tCenter"><b>Pay Per Hire</b><br>Participate for free and pay per hire</p>
</div>
I tried looking around on stackoverflow but couldn't find any similar posts. Does anyone know what the problem could be?
Thanks in advance people!!
EDIT: This may be caused by any overriding css property.
It's possible that it may be being removed by another CSS rule, for example:
.twhite b { font-weight: normal; }
If you are using chrome, right-click on it and choose "Inspect Element", then see what CSS rules are being applied. That will give you your answer.

How to set :hover for all elements [closed]

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
Why does this doesn't work?
*:hover {margin-left:50px;}
Cause when I move over the element nothing happened.
Are you putting it at the end of your CSS file? If not, it may be getting overwritten.
*:hover {
margin-left: 50px;
}
is working for me.
What browser are you testing on?
Try the code below
body *:hover {margin-left:50px;}
try
body :hover{
margin-left: 50px;
}
this will apply the :hover to every inner element in body
I've just tested on Chrome and seems to work

Adding a notification bar to a website [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to add a red notification bar to my site to display notices for example scheduled maintenance.
What code would I need to add to my site to enable this to work.
Thanks.
Just add a div with some styling to the top of your site.
<div id="notificationbar">
<p>Currently the site is down</p>
</div>
You can style it with css:
#notificationbar {
background-color: red;
}
#notificationbar p {
color: white;
}
You can do many things with it using javascript or css. If you don't understand the above, you should check out how to write HTML and CSS (try looking on google) or hire someone who does.