Solved

CSS and Italics

Posted on 2015-02-16
11
178 Views
Last Modified: 2015-02-17
Hey all,

I assume this is a CSS question. Forgive me if I am wrong.

Is there something in CSS that determines the slant of the italics?

I have seen different websites, with the same font, but seemingly varying degrees of slant on the italics.

So, I am looking to alter this parameter on my own site. If possible.
0
Comment
Question by:Gareth Gudger
11 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40613393
Yes, there are two types of italics in CSS: italics and oblique:

http://www.w3schools.com/cssref/pr_font_font-style.asp
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 40613407
Technically speaking, though, italics and oblique are different things.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40613485
Technically speaking, that's true.  However:

It doesn't really matter at the end of the day with lots of fonts.
ToMAYto, toMAHto.
0
 
LVL 30

Author Comment

by:Gareth Gudger
ID: 40614208
So is there a way to modify the lean of the italic? I am using WordPress and switched Themes and it renders my italics differently than before. Although it is still using the same font. If it's the same font, I assume they have modified the degree at which the italics lean. Like you can modify say font weight.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40614456
Right click and Inspect Element from the browser on an italicized section.  What does the CSS say?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 30

Author Comment

by:Gareth Gudger
ID: 40614470
Hmm nothing out of the ordinary. Maybe it is just the font renders differently in this Theme. Its the Lato font. Maybe my old WordPress theme (Twenty-Fourteen) was doing something to the font and this one doesn't.

Check one of my articles. You can see the lean on some of these <em> is very pronounced.
https://supertekboy.com/2015/02/16/windows-process-activation-service-will-not-start-error-13-the-data-is-invalid/
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40615478
There's nothing special there.  The font is from a standard family, the effect is standard italics.  Your bold is very heavy (font-weight: 700) so I think you are seeing an optical illusion from the effect of the boldfacing.

In unrelated news, you're spending waaaaaaaaay too much time examining the typeface :)
0
 
LVL 42

Accepted Solution

by:
Chris Stanyon earned 500 total points
ID: 40615486
This is an example of where italics and obliques are NOT the same.

In your page, you are using the Lato Normal 400 from Google Fonts - when you ask for it to be in italics, your browser will oblique it - it has no other option!!

If you want it to look correct, then include Lato Italic 400 as well, and then when you ask for italics, your browser will actually use the italic version of the font, which isn't as slanted.

<link href='http://fonts.googleapis.com/css?family=Lato:400,400italic' rel='stylesheet' type='text/css'>

Open in new window

0
 
LVL 30

Author Comment

by:Gareth Gudger
ID: 40615714
Chris that's it! You are a genius. Now if only I could assign you more than these mere 500 points. Thanks to everyone else as well.

For WordPress users reading this. This is under your child theme's functions.php file.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40615854
For WordPress users reading this. This is under your child theme's functions.php file.

Not necessarily.
0
 
LVL 30

Author Comment

by:Gareth Gudger
ID: 40615904
Good to know.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now