Skip to main content

All Questions

Tagged with
0 votes
1 answer
25 views

Precedence in parent/child classes of same specificity [duplicate]

In the given code snippet why font size of h1 element is 36px? I have these questions : If h1 is defined 1st, then the font size of main(i.e. 32px) should be applied on the h1 heading, as it is ...
Shubhang Sahu's user avatar
0 votes
1 answer
35 views

css a element selector overriding bottom element selectors

hello, I am trying color my paragraph tag but i unavailable to do because top p tag (element selector) is overriding bottom p tag. it work when i write tag name but i want them to automatically ...
yashlodhi's user avatar
  • 139
4 votes
1 answer
96 views

Why is the font-size, but not the color, property applying to elements?

I'm self-teaching myself Html/Css, kindly explain to me like a dummy(phew!) Help clear the doubt where I tried to target my list items in an unordered list. I realized that color property couldn't be ...
Polycarp Angololo's user avatar
0 votes
0 answers
39 views

element style declared twice in css but css is not appling the stlye declared at last why is it so?

css selector specificity is not behaving the expected way. this is the HTML Code <nav> <p>This is the navigation</p> <a href="blog.html">Blog</a> ...
ShivBalaji's user avatar
0 votes
0 answers
34 views

CSS class effects the color of the text but not the font family

I am trying the understand the CSS and building the simple app. In this website there is a text under a div like that <div className='app__navbar-name'> <h1>ASDAS</h1> </...
asimtot's user avatar
  • 185
0 votes
1 answer
83 views

Font size shrinks when I add Boostrap 5

The font size changes when I add the Boostrap CDN link. I found that this is because Boostrap has a default font size. I tried to change the font size by specifying the font size in the external style ...
user19490977's user avatar
0 votes
2 answers
39 views

my stylesheet is not working using CSS bootstrap

I am just learning how to do a basic web page. So this is the main code <navbar class="navbar navbar-light pip-footer"> <div class="row"> <div class="col-...
spartan052's user avatar
1 vote
2 answers
59 views

CSS Specificity - Conflicts between CSS selectors

I have a question regarding the following pseudo-class selector. Even with !important, the text under this li:first-child is not showing blue. p has Selector Specificity: (0, 0, 1) li:first-child has ...
Jeffrey's user avatar
  • 113
-4 votes
1 answer
61 views

CSS specificity selector: element selector overrides pseudo class [duplicate]

Im new in CSS, i was learning about CSS element specificity, and I know that at the end the selector with more specificity will be applied, but how about this case: this supposed to be more specific ...
Cristian San's user avatar
0 votes
1 answer
66 views

What is context in css specificity?

I am reading this article on @ layers in css: https://www.bram.us/2021/09/15/the-future-of-css-cascade-layers-css-at-layer/#cascade-layers--position-in-the-cascade I can't find on google what is ...
user31782's user avatar
  • 7,617
0 votes
1 answer
20 views

Rules Specificity [duplicate]

body { font-size: 12px; } .brown { color: brown; font-weight: 200; } .large { font-size: 28px; } .normal { font-size: 18px; color: blue; font-weight: 700; } <html> <head&...
Raphael Lanz's user avatar
1 vote
2 answers
229 views

Two CSS declarations with same specificity have a strange behaviour

I have those two CSS declarations. Both have the same specificity - I even checked on a Specificity Calculator to be sure that they are equal. In that case the last declaration found in the CSS should ...
Puzzi22's user avatar
  • 31
0 votes
0 answers
48 views

Why is the !important required?

I believe the specificity is right, and I checked the compiled CSS, but I have to include the !important for this to work. I'm getting kind of angry because of this to be frank. Any help will be ...
Isaac's user avatar
  • 1
1 vote
2 answers
855 views

Can't change the style of link

I'm very new to coding and I currently try to change the style of my html link. I've nested my Picture, <h1> and <p> in a <a href> to make it all a link to the same destination, but ...
user16716646's user avatar
0 votes
0 answers
16 views

How is css specificity determined for elements with the same selector? [duplicate]

I have two styles affecting the same element (myDiv) from different stylesheets. Stylesheet1.css .myDiv{ background-color:#000; } Stylesheet2.css .myDiv{ background-color:#FFF; } Neither style ...
Urbycoz's user avatar
  • 7,431

15 30 50 per page
1
2 3 4 5
9