Solved

Need help bringing down one line <p> in the footer

Posted on 2014-12-24
12
87 Views
Last Modified: 2014-12-26
Hi, I'm using VS2012.
I've been trying all morning to vertically align this one line of text, very frustrated.  It's at the top of the first div, which has a color background.  I tried verticalAlign, and margin-top but it won't move at ll.  I'm attaching a screen shot of Firebug and would really appreciate help in fixing this.
footer.png
footer2.png
Site.css
0
Comment
Question by:lapucca
  • 5
  • 5
  • 2
12 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40516968
What's wrong with text-align:center

Post a screenshot of the webpage.
0
 

Author Comment

by:lapucca
ID: 40517138
text-align:center
This centers the text Horizontally.  The problem I have is vertically, this paragraph stock to the top of my footer div/background image
Attached is a screen shot of the footer area.
Thank you
footer3.png
0
 
LVL 58

Expert Comment

by:Gary
ID: 40517236
The screenshot makes no sense
0
 
LVL 12

Accepted Solution

by:
Ammar Gaffar earned 500 total points
ID: 40517555
Try padding-top.
0
 

Author Comment

by:lapucca
ID: 40517748
The screen shot is the footer area that has a background image, repeat across the entire screen.  

What's the difference with padding-top.  The margin top just grew space upward and went above the div that contains the paragraph.   Thank you Ammar.
0
 
LVL 12

Expert Comment

by:Ammar Gaffar
ID: 40517768
Padding is the space inside the border of your container,  but marigin is the space outside the border of your container
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:lapucca
ID: 40517893
Ha!  Thanks Ammar!  That is such valuable information to learn.  Now the difference is clear to me.  Thank you.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40517909
Padding is the space inside the border of your container,  but marigin is the space outside the border of your container
Not quite correct, it depends on the box model used, if you use border-box then everything is inside the element. And this is the much preferred method

http://css-tricks.com/box-sizing/
http://www.paulirish.com/2012/box-sizing-border-box-ftw/
http://css-tricks.com/international-box-sizing-awareness-day/
0
 

Author Comment

by:lapucca
ID: 40518077
Thanks Gary.  I need to read that a few more times to get it.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40518080
border-box - your element never grows beyond the size you set, if it's 100px wide and you add a 10px padding then you have 80px wide available space to work in, if you add a border then the same applies
But margins are added to the element size

content-box - if the element is set to 100px then no matter the margin, padding or border you always have 100px, but your element will be 100px + margin + padding + borders. So it will be bigger than 100px
When designing websites this becomes a real pain.
0
 

Author Comment

by:lapucca
ID: 40518103
Okay, I got the border-box the way you explain it.  Padding and border cuts down the work space.  The margin is outside of border which is outside of padding.

Content-box seems easier to understand since it's all extra around the element.

Thank you Gary.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40518496
Content-box seems easier to understand since it's all extra around the element
Depends on how you design, if you set an element to 100% width (or use any percentage based layout) and then add padding and margins then it is bigger than 100%, with border-box it's still 100%.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now