Solved

Padding Acting Like Margin

Posted on 2011-09-13
6
992 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
  • 3
  • 3
6 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 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 82

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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 82

Expert Comment

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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

758 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

27 Experts available now in Live!

Get 1:1 Help Now