Thread: Help with CSS
View Single Post
Old 01-20-2014, 06:57 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,657
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by joshua.kendrick View Post
I want to be able to make my text size larger or smaller when I need to without having to continually change the coding. Any help would be great.
Don't specify any hard-coded font-sizes in your CSS or html. Use relative units (em or %) if you need some text bigger or smaller than the regular body text.

Code:
p {
  text-indent: 1.2em;
  margin: 0;
}

p.bigger-text {
  text-indent: 1.2em;
  font-size: 1.125em;
  margin: 0;
}

p.smaller-text {
  text-indent: 1.2em;
  font-size: 0.85em;
  margin: 0;
}

Last edited by DiapDealer; 01-20-2014 at 07:02 PM.
DiapDealer is offline   Reply With Quote