I am trying to add css to my FullCAlendar 5 Events using 'classNames:'; e.g.,
classNames : cssItalic,
When I define the cssItalic css as:
.cssItalic {
font-style: italic;
font-weight: bold;
}
It works. However, when I change it to:
.cssItalic {
font-style: italic;
font-weight: bold;
text-decoration: underline;
}
The underlining is not done (i.e., bold and italic work).
So, what css can be used with FullCalendar 5?
After further testing I found the the underline is shown in the list view however, not in the month, week and day views.
If you inspect the elements you're trying to underline, you'll notice that they have a style definition already:
a:not([href]):not([tabindex]){
color: inherit;
text-decoration: auto;
}
Your problem is that .cssItalic is not as specific as the existing selector that sets text-decoration. This is why bold and italics still work, but underline does not for these elements.
Your two options are: make the selector more specific, or use !important for the text-decoration rule.
Related
I used:
td.product-name dl.variation dd li:before {
font-family: "Font Awesome 5 Free";
content: "\f00c";
color: #000;
margin-right: 8px;
}
to add an icon :before each list element.
The icon appears as it should on Safari:
But not on Chrome:
Why?
Here's a link to my website: https://www.mydreamtattoo.com/checkout/?add-to-cart=3981
The check icon list is in the order review table below the product name.
I've used this method to add icons :before elements with CSS in the past in other places and it has always worked. This time it didn't.
Found the issue, you need to add font-weight: 600;
I had a similar issue and found adding font-weight: 900; worked.
Is there a way to make font-size and font-weight change more dynamically using Less?
For instance:
#h2font{
font-size: 32px;
font-weight: 700;
}
or is there another solution to this?
I'm not super familiar with less.js but typically if you want to change the font size/weight for ALL h2 tags it would look like:
h2{
font-size: 32px;
font-weight: 700;
}
If you wanted to do it differently you can use id's or classes to setup styling conventions that apply to some but not all.
I'm assuming that your #h2font should just be "h2" but I could be wrong due to my lack of knowledge specifically with less. Otherwise you can use JavaScript/jQuery to dynamically change element styling based on user interaction on the page.
So I have a button inside a div. I want to make the font-weight: bold so I put it in the css. I fire up the website and the text of the button isn't bold. I then check it with Firebug and the font-weight: bold isn't even there? When I manually type it there in firebug my text becomes bold, just as I want it.
I'm working with bootstrap, here is the css of the button:
.btn-primary {
background: url("../img/bg-nav.png") repeat-x scroll left bottom #198901;
color: #ffffff;
font: 17px "bowlby_oneregular",sans-serif !important;
font-weight: bold;
text-transform: uppercase;
}
I find it strange that it doesn't show up with Firebug, and yet when I put it there with Firebug it works
There are two solutions:
Remove !important:
font:17px "bowlby_oneregular",sans-serif;
font-weight:bold;
Split the shorthand property up:
font-size:17px;
font-family:"bowlby_oneregular",sans-serif;
font-weight:bold;
The exact solution depends on how exactly you want to apply the fonts. But I’d simply rewrite your code so that !important will never become necessary.
I am trying to change the font family of an aside tag. I created the following section in my css file -
.instruction {
color: brown;
font: verdana;
}
and assigned aside, class = instruction. But it does not work. I have also tried using aside as an element in CSS to assign the properties like
asign {property: value;}, but no effect.
But if I only use color property, then it works. So is there any issue with assigning font family and related properties to aside tag? I am using Chrome 28.
Use font-family: verdana; instead of font: verdana and when you are using font shorthand properties care of the following order:
1. font-style
2. font-variant
3. font-weight
4. font-size/line-height
5. font-family
And also you cannot apply just one value in shorthand method. For font, it should at least two values for eg. font-siz and font-family
image source
When using the font shorthand you must specify at least a font-family and a font-size - not just one or the other - the exception is when using system fonts - e.g. font: menu;
Also note that the font-family property must appear after font-size.
.instruction {
color: brown;
font: 1em verdana;
}
http://jsfiddle.net/GRBRU/
Either
{
font-family: Verdana;
font-size: 13px;
font-weight: bold;
}
Or:
{
font: 13px bold Verdana;
}
I'm trying to adjust the font weight rather than just "bold". It appears to be doing nothing on Verdana text. Has browser support for this dropped or something?
<div class='business-hours'>
Toll free: (866) 528-4930 · Mon-Fri 9-5 EST
</div>
#hd .top-nav .business-hours {
text-align: right;
font-family: verdana;
font-weight: 600;
font-size: 10px;
color: #9ea3a0;
}
Numeric and other less usual font-weight properties (like semi-bold, book etc.) are supported very poorly across browsers, and AFAIK relevant only if the font itself provides support for the given value (i.e. has a explicit book or 900 font weight defined). So it's not really a sensible thing to use if consistency is desired.
See Are all css font-weight property's values useful?
And reference info at the W3C
Is it an H1 tag or something? Check that you don't have CSS overwriting your less specific rule. Otherwise Syntax is as follows:
<style>
.myboldtext
{
font-weight: 400;
}
</style>
<span class="myboldtext">This is my bold text</span>
400 for regular, 700 for bold.
Hope this helps!
Depending on parent font-styles it can be hard to see that text has in fact been bolded. For example:
p {
font-weight: lightest;
}
p span {
font-weight: bold;
}
and
<p>Hello, <span>world</span></p>
In many browsers its actually difficult to see any difference between the bold text and the regular body text.
Instead of just specifying font-weight: bold; try changing it to
font-weight: 700;
This will tell the browser to render the text with a heavier than even normal bold weight.