Jump to content

Need help in width


shayan

Recommended Posts

Hi guys

 

iv a problem in css and if you help me i really appreciate that

 

i wrote this:

 

<!doctype html><html><head><style type="text/css" >p {border:solid 3px orange;background-color:yellow;color:green;padding:40px;}</style></head><body><p>This is the fist para</p></body></html>

...............................................................................

 

so you can see there is a text in the border but the text is in the left i wana to be at the center and also i want to make left and right width shorter

 

so if you can help me please pm me

 

 

 

 

 

Link to comment
Share on other sites

<!doctype html><html><head><style type="text/css" >    p {        text-align: center;        }    span  {        border: solid 3px orange;        background-color: yellow;        color:green;        padding:40px;        display: inline-block;    }</style></head><body><p><span>This is the fist para</span></p></body></html>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...