Solved

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

Posted on 2014-12-24
12
89 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET MVC - Views 3 42
YouTube API get the Video Tags - vb.net 7 31
bootstrap css color change 10 21
Web page design problem 3 16
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

733 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