April 13, 200917 yr Hi I am writing css, and my text is going right the way across my page. I was wondering if anyone can help me sort this out. I'm a newbie to writing code, so be gentle! lol. I am guessing I will need to set the left and right margin. Do you know how I would do this?
April 13, 200917 yr p{margin:0 1.5em 0 1em} You can use any type of measurements, em, pt, px etc. The numbers come in a compass sequence (north east south west, or clockwise, whichever is easier for you to remember). and remember, margins are outside an element, padding is inside. P.S the p{} means it will apply to all <p></p> tags
April 13, 200917 yr Author thanks, with this, am i able to set the margin a different colour from the center where i want text, or is that a little more complex? thanks x
April 13, 200917 yr thanks, with this, am i able to set the margin a different colour from the center where i want text, or is that a little more complex? thanks x Not sure exactly what you mean.
Create an account or sign in to comment