Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Chaiwut Chaianuchittrakul
Chaiwut Chaianuchittrakul
17,222 Points

CSS first letter does not appear on iPhone's Safari

Hi, I'm using the CSS code that change the first letter of each article to larger one. By the code follows:

p.first:first-letter{
font-size:3em;
line-height:90%;
text-shadow: 0.05em 0.05em #C0C0C0;
display:block;
float:left;
margin-top:5px;
margin-right:4px;
padding-left:2px;
padding-right:8px;
text-indent: -9000px !important;
}

I checked that all of property are supported by major browsers including Safari, Opera and IE. However, my friend just notify me that first letter of each article disappear from iPhone's Safari. Do you guys have any ideas on this?

You are welcome to visit my blog at www.thezeal.cc on the homepage you will get the idea about the first letter.

Thank you Chaiwut

3 Answers

Sjors Theuns
Sjors Theuns
6,091 Points

Hi Chaiwut,

the missing letter is also on Safari on a mac. The problem seems to be lying in the css line:

text-indent: -9000px !important;

Try removing this line and see if you get the desired result.

Sjors Theuns
Sjors Theuns
6,091 Points

Hi Chaiwut,

can you post some of your html code regarding this?

Also, are more people having this problem or is the first letter normally visible on other browsers?

Chaiwut Chaianuchittrakul
Chaiwut Chaianuchittrakul
17,222 Points

Thank you helping me.

Unfortunately, it is a Wordpress theme. So I could not post more than this. (I can but nothing is going to be related to this)

Also, I tested it by myself by my own iPhone and got the same results too.

You are welcome to visit my blog at www.thezeal.cc

on the homepage you should be able to see the first letter of each article bigger than other texts.

Chaiwut Chaianuchittrakul
Chaiwut Chaianuchittrakul
17,222 Points

Thank a lot Sjors!! The problem seems to be solved after I removed that line.

Sjors Theuns
Sjors Theuns
6,091 Points

Your welcome. I can verify that it now also works on Safari on my Mac.