Build Your Own Business Website header image

Welcome to our Members Only Forum

You are welcome to view the content on our Forum, just scroll down to view this forum post.
If you like what you find and want to be able to post a question, please check out our subscription options.
Please feel free to search the forum using either the Google Site Search above or the forum search below.

Avatar
Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Should I use "em " or "px" when working on Custom.css?
Avatar
Oscar Garcia
Member
Members
Forum Posts: 3
Member Since:
January 7, 2011
sp_UserOfflineSmall Offline
1
February 15, 2011 - 2:52 pm
sp_Permalink sp_Print

 Hello Rick,

I am customizing my thesis navigation menu.  After going over your lesson 10 of your Intermediate Video Tutorials it is unclear to me if I should use "em" or "px" when editing my custom.css.  following is an example of my editing:

 

.custom .menu a
{
   padding: 1em 1.6em 1em 1.6em;
   line-height: 1em;
   font-weight: bold;
   letter-spacing: .2px;
   text-transform: capitalize;   
}
.custom .menu ul a
{
   padding: .6em .6em;
   padding-left: 1em;
   line-height: 1em;
   font-weight: normal;
   letter-spacing: 0px;
   text-transform: capitalize;   
}

 

I tried experimenting with px where you see em and I know that 1px is not equal to 1em, but other than that I don't notice a difference.  is there a benefit in using one vs the other?

Thank you for all your great material!

Regards,

 

Oscar G

Avatar
Rick Anderson
Desert Hot Springs, CA
Admin
Forum Posts: 13637
Member Since:
November 8, 2009
sp_UserOfflineSmall Offline
2
February 15, 2011 - 3:46 pm
sp_Permalink sp_Print

Oscar - welcome to the forum.  I don't really have a hard and fast rule for which to use.  When you use ems they can easily be scaled larger for those with visual impairments.

Ems are relative measurements.  In Thesis the 1 em equals a large fraction of the px equivalent of pts.  When you pick your main font size in Thesis Design Options the em is calculated.  If you are using 14pt text 1 em is roughly 11px.  If you are using 16pt (which I generally do) 1 em is equal to roughly 12 px.

Px is (sort of) absolute.  It represents the number of pixels in height that the text is.  Of course not all text is measured in the same way so 14pt Arial is different in size than 14px Georgia.  When I feel like I really need to make sure that something isn't too large then I use px.  Also, it's just easier for me to think about.

Avatar
Oscar Garcia
Member
Members
Forum Posts: 3
Member Since:
January 7, 2011
sp_UserOfflineSmall Offline
3
February 15, 2011 - 4:04 pm
sp_Permalink sp_Print

Thank you for your quick reply.

It is clear to me know,  I suppose  ems are a good idea for my Nav Menu specially when relying on font characteristics from the thesis defaults.  

By the way,  your tutorials have been the best thing out there.  I am learning all the basics to start my Real Estate website and your instructions have been instrumental.

Regards,

Oscar Garcia

Avatar
Rick Anderson
Desert Hot Springs, CA
Admin
Forum Posts: 13637
Member Since:
November 8, 2009
sp_UserOfflineSmall Offline
4
February 15, 2011 - 4:11 pm
sp_Permalink sp_Print

Oscar, I'm glad you're finding the site to be useful.  Please feel free to continue to ask specific questions about adding custom functionality to your site.  If you're into that, that is. smile

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 228

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Keith W Jones: 1428

Brian Tozer: 1004

Carolin: 982

Heidi Hafner: 508

John Cunningham: 423

Reece Morrel: 353

Newest Members:

emma62755

sharonmarks

emma80233

Tijs de Jong

Daniel Frey

mutek

Forum Stats:

Groups: 8

Forums: 46

Topics: 6995

Posts: 34796

 

Member Stats:

Guest Posters: 6

Members: 6761

Moderators: 2

Admins: 2

Administrators: Rick Anderson, Rick Anderson

Moderators: Pierre Cote, Laura Nugent