Welcome to WebmasterWorld Guest from 54.226.146.15

Forum Moderators: not2easy

Message Too Old, No Replies

How to make headings with bold text

     

toplisek

12:07 pm on Apr 4, 2014 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I have tested H4 and H3. When I set <b></b> it will not work bold text. Is there some option to reset font-weight: inherit; which is inside browser detection

Element html, body is like:
html, body, strong, b {
font-family: inherit;
font-style: inherit;
}

Browser added item:
font-weight: inherit;

This will prevent H4 and bold text if needed.

brandozz

12:14 pm on Apr 4, 2014 (gmt 0)



Are you trying to change the font weight for the h4 and h3 elements from bold to normal?

If so you can use the following:

h3, h4 {
font-weight: normal;
}

lucy24

7:49 pm on Apr 4, 2014 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



When I set <b></b> it will not work bold text.

Good: That means your CSS is doing what it's supposed to:
html, body, strong, b {
font-family: inherit;
font-style: inherit;
}

(Saying both "html" and "body" seems overkill, since how often do you have html outside the body?)

But why would you want to do this? The effect is to obliterate bold all the time, everywhere, unless you attach
{font-weight: bold;}

to some specific element and don't use a supplementary <b> tag (which would normally come inside any other element). Are you protecting against someone else coming along and absent-mindedly sticking in a <b>?

By default, all header <h1-6> elements are bold, left-aligned-- and probably much smaller than you want.

It's true that sometimes you'll use CSS to make things do the opposite of the default. In ebooks I often have this package:
.ital {font-weight: italic;}
em {font-weight: normal;}

but using it with bold seems odd.

abiabiah

8:53 am on May 7, 2014 (gmt 0)



You can try something like following

#div h4 {

font-weight: normal;

}

It will work if you have something like following.

<div id="div-name">
<h4>Hello</h4>
</div>
 

Featured Threads

Hot Threads This Week

Hot Threads This Month