?
Solved

Padding Acting Like Margin

Posted on 2011-09-13
6
Medium Priority
?
1,069 Views
Last Modified: 2012-05-12
I am having problems with using padding. When I apply it to my #content-right and #right its shifting everything like its a margin. Any ideas as to what is going on. I am using Joomla! 1.7 as a content management system.

http://www.cybernetiksolutions.com/cybernetiksolutions.com/
0
Comment
Question by:thebradnetwork
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 36533451
That's what it does.  Here's the 'official' description: http://www.w3.org/TR/CSS2/box.html   When you specify a 'width', it is the width of the 'content' the innermost part of the HTML box model.  Padding, border, and margin are added to the outside.  The difference between padding and margin is that padding is inside the border and has the background color of the content.  Margin is outside the border and is transparent.
0
 
LVL 6

Author Comment

by:thebradnetwork
ID: 36533849
Let me try and explain this in more detail. I have specified a width of 65% or 650px for #content-right. When I add a padding:15px; its also like its adding 30px to the left and right equaling out to 680px. When I add the padding of 15px instead of taking the content and pushing the border in its expanding it. I hope that makes more since as to what problem I am having.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36534061
Apparently you didn't look at the link that I posted.  What you are describing is correct behavior.  Padding pushes the border Out because padding is Inside the border.  Nothing reduces the size of the content area, padding, borders, and margins are Added to the outside content.
0
Technology Partners: 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 6

Author Comment

by:thebradnetwork
ID: 36534093
I did read the link you send. I still do not think that I am conveying my message. I will do an illustration of what I need to happen as to what is really happening. Also I was able to figure out the problem. Sometime I guess it helps to step away for a minute and then refocus. Thanks for your help.
boxdimeg.png
0
 
LVL 6

Author Comment

by:thebradnetwork
ID: 36534095
Ignore that illustration I attached. I didnt mean to attach it.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36534272
Do you have what you need now?
0

Featured Post

Tutorial: Introduction to Managing a Linux Server

In this tutorial on systemd, we will explore:
-OS/Distro Adoption
-chkconfig and Other Legacy Commands
-Summary and Key Commands

Question has a verified solution.

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

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.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

765 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