I am studying CSS at ECU and I have come across padding, I think I understand that it is to create space between text and the border, but am not able to make it work for me.
What is padding, and how do I use it?
Page 1 of 14 Replies - 385 Views - Last Post: 23 August 2012 - 09:14 PM
Replies To: What is padding, and how do I use it?
#2
Re: What is padding, and how do I use it?
Posted 23 August 2012 - 07:43 PM
clarissa_milner, on 23 August 2012 - 07:37 PM, said:
I am studying CSS at ECU and I have come across padding, I think I understand that it is to create space between text and the border, but am not able to make it work for me.
padding: 5px
OR
padding-left: 5px
padding-right: 5px
padding-top: 5px
padding-bottom:px
#3
Re: What is padding, and how do I use it?
Posted 23 August 2012 - 07:48 PM
What you should try to do is create a box element, turn the borders on, add the text inside and see how it works when you manipulate the values. Basically, padding is the space between the inside elements with relation to their immediate parent elements. So:
Setting the padding of the box will adjust the text inside. The higher the value, the further the box will be from the text.
<div id="box"> <p>Emperor Tomato Ketchup</p> </div>
Setting the padding of the box will adjust the text inside. The higher the value, the further the box will be from the text.
#4
Re: What is padding, and how do I use it?
Posted 23 August 2012 - 08:11 PM
Thank you, AnalyticLunatic, I was forgetting to add the px...
fromTheSprawl your info was really helpful too
fromTheSprawl your info was really helpful too
#5
Re: What is padding, and how do I use it?
Posted 23 August 2012 - 09:14 PM
clarissa_milner, on 23 August 2012 - 08:11 PM, said:
Thank you, AnalyticLunatic, I was forgetting to add the px...
fromTheSprawl your info was really helpful too
fromTheSprawl your info was really helpful too
Glad I could help. Always be sure to add what measurement you are using.
In some browsers, it will be assumed the number represents px.
Whichever measurement you use, use that same one throughout the whole site.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote




|