css - Trying to control width and right-align, only one works -


my knowledge of css non-existent, i'm trying spruce wordpress site , can't seem text both width and right aligned. either 1 works on own, when use

p{text-align: right;} p {height:100px; width:300px;} 

the width correct alignment goes default (left). i'm sure not how make effect work, again pretty foreign me , appreciate help.

the wordpress theme has box custom css, , sake of completeness i'm using:

body {color:#757575;} h1.site-title {color:#ff0000;} p{font-family: verdana, geneva, sans-serif;} p{text-align: right;} p {height:100px; width:300px;} h1.site-title { font-family: century gothic, sans-serif;} h2{font-family: century gothic, sans-serif;} h2{color:#000000;} h2{text-align:right} nav {font-family: century gothic, sans-serif;} a:link {color:#000000;} a:visited {color:#000000;} a:hover {color:#000000;} a:active {color:#000000;} 

maybe wordpress css has css rule overrides yours. keep in mind if theme css have eg. css rule:

.paragraph p{   text-align: left; } 

and below add rule:

p{   text-align: right; } 

even if put rule last one, has lesser priority theme 1 css rule applied theme one. try add modifier important! you'll have:

p{   text-align: right !important; } 

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -