How to override default tag css to normal?
Tags: html,css,html5,css3,user-interface
Problem :
Is there a way to make the text wrapped inside <b> </b>
tag as normal?
I've tried implementing font-weight: normal !important;
through CSS, but it didn't help. Is it even possible?
Reason of asking this question:
- I'm writing print page styling for a ready made page, so it is not possible for me to get into the code and replace the
<b>
tag. - After several failed attempts, I am quite curious to know if it is possible to override user agent stylesheet for tag.
Here is the screenshot:
It is seemingly impossible for me to produce it on jsFiddle.
Here is the HTML code:
<figure>
<i class="icons-i-Spirit"></i>
<figcaption class="text-uppercase"><b>main spirit</b></figcaption>
</figure>
Here is the CSS:
figcaption {
font-family: 'TradeGothicW01-BoldCn20_675334';
font-weight: normal !important;
}
Solution :
There are two things going wrong in your case:
- You are applying
css
to the parent of<b>
tag. Make your code as following:
figcaption b { font-family: 'TradeGothicW01-BoldCn20_675334'; font-weight: normal !important; }
- Considering your screen-shot, you are making the
CSS
edit which is described in 'Point 1' on Chrome's style editor. Please make the changes in yourCSS
file and then reload your page.
PS: I have also been in such situation for hours. It makes you feel quite dumb of yourselves. Don't worry, To err is human!
CSS Howto..
I think the question is nice and clear and obviously the OP doesn't have any code... that's why he's asking the question. I've run into that exact issue before. I...
The reason this fails is that the column mixin not only sets the width of the element, but also floats it left and applies a right margin (unless it's the...
I was a doubter, but i've managed to hack together what you wanted using only CSS https://jsfiddle.net/j2w27c6n/2/ img:hover ~ underlay{ top:0px; left:100px; width:300px; height:300px; } It's easy if you move...
You can target inputs by their type thus applying different styles to them: CSS /* Text Field */ #addQuesion input[type="text"] { width: 200px; } /* Button */ #addQuesion input[type="button"] {...
You can just compute the min of the amount scrolled and 15 in the blur function. Like this: $(window).scroll(function(e) { var distanceScrolled = $(this).scrollTop(); $('.boop').css('-webkit-filter', 'blur(' + Math.min(distanceScrolled/30, 15) +...
I guess what you want to change in your CSS / html , are states. Like if a lamp is on/off? Then you need to save each state in a...
@thirtydot, The box width is fixed, both width and height. How do I use 4 corners with divs ? – Ibn Saeed Maybe I'm missing something, but if the...
You can't do this without using Javascript. I highly recommend JQuery, it has a parent function to access parent items. CSS traditionally does not have a parent selector because of...
You need to use a different selector for each engine, unfortunately. #box::-webkit-input-placeholder { font-style: italic; } #box::-ms-input-placeholder { font-style: italic; } #box::-moz-placeholder { font-style: italic; } Here’s a demo!...
I have modified a few elements in Chrome to get the requested view. Just modify the following CSS, you will have the radio slider on the left, image on the...
Break up your stylesheet into modules: Navigation, content types, header, footer, etc. Don't use ids for assigning styles. This gives some more information on why that is, and more helpful...
Do you have any suggestion on how to successfully seperate HTML/CSS from PHP/SQL? Congrats for looking how you can improve code. That's the precondition, you need to want to...
I understand that you want something like this. .tag { background-color: #EEF; /* Set the background color */ border-radius: 3px; /* Add some roundness */ border: 1px #CCF solid; /*...
Check this FIDDLE You just had to add this a:hover { text-decoration:underline; } .bw { /* Effects on images */ -webkit-transition: all 0.3s cubic-bezier(1.000, 0.835, 0.000, 0.945); -moz-transition: all 0.3s...
You access the id information in an .html.erb file just as you would in a normal .html file, it is still just basic HTML. You would set the id of...
As mentioned above, to change the styles that affect the H1, H2 etc, we just need to specify an alternate stylesheet and in it, specify the styles as the are...
It'd be best to wrap all of your elements in label elements, then apply css to the labels. The :before and :after pseudo classes are not completely supported in a...
The only way to remove the blurred edges in a pure CSS way is by zooming the element a little bit then clipping the edges with overflow: hidden added to...
I think you have to try to use chai-jquery please install using npm install chai-jquery --save and change your code to expect(element).to.have.css('height', 30'px'); thanks...
Try Firefox Extension Dust-Me or Chrome Developer Tools that called Audits. Inspect -> Audits tab -> Run -> Remove unused CSS rules. or Try this site. also you can refer...
You can try display: table-cell;. Here is the updated code div[class*='col'] { border:solid 1px #000; height:100%; display: table-cell; float: none } .row { border:solid 1px #000; /* height:500px; */ display:...
In css add a z-index value like say : z-index:100
input { width: 100%; box-sizing: border-box; } .one { width: 200px; background-color: blue; height: 60px; float: left; } .two { background-color: red; height: 60px; width: auto; } .three { background-color:...
What I noticed playing around with it is if I rotated a square around the Y axis, the side sticking out towards me would be "clickable," while the side pointed...
You have to use div that covers over the text area so that you can select image and submit form as multipart. Its totally game of CSS. You can use...
Ok i have sorted it out the issue, i start from the beginning calling the project differently ( without any hyphen) then i set up the output folder by LiveReload...
Simply the parent must have a width and position rule, and children position: absolute Here is a working example EDIT: I checked your code, and you have visibility set to...
Suppose you have: <div id="mydiv" class="oldclass">text</div> and the following styles: .oldclass { color: blue } .newclass { background-color: yellow } You can change the class on mydiv in javascript like...
The docs you linked actually mention it... You just need to check this.customStyle['--my-property-name'] and it will have the value of the property...
#myForm{ max-width: 100%; width: 800px; height: 300px; position: relative; background-color: #A0A0A0; color: #fff; font-size: 2.4em; font-weight: 700; } #myForm span{ display:inline-block; vertical-align: middle; } #myForm::before{ content: ''; position: absolute;...