Web Design Forum: setting margins - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

setting margins

#1 User is offline   leaaa 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 58
  • Joined: 14-March 09
  • Reputation: 0
  • Experience:Nothing
  • Area of Expertise:Designer

Posted 13 April 2009 - 04:05 PM

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?
0

#2 User is offline   bocaj 

  • Retired
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 3,402
  • Joined: 11-January 09
  • Reputation: 99
  • Gender:Male
  • Location:New Sarum
  • Experience:Web Guru
  • Area of Expertise:Entrepreneur

Posted 13 April 2009 - 04:13 PM

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 :)
0

#3 User is offline   leaaa 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 58
  • Joined: 14-March 09
  • Reputation: 0
  • Experience:Nothing
  • Area of Expertise:Designer

Posted 13 April 2009 - 05:01 PM

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
0

#4 User is offline   caraewilton 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 24-October 08
  • Reputation: 0
  • Location:South Africa
  • Experience:Beginner
  • Area of Expertise:I'm Learning

Posted 13 April 2009 - 05:11 PM

View Postleaaa, on Apr 13 2009, 19:01, said:

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users