This is a discussion on "padding content" within the Web Page Design section. This forum, and the thread "padding content are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
padding content
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
padding content
I want to position some graphics inside a div (e.g.footer) I know that if the content is text (p) I can use the following:
Last edited by karinne; May 2nd, 2007 at 11:52. Reason: Please use [code]...[/code] tags when displaying code! |
|
|
|
|||
|
Re: padding content
None that i have hosted anywhere. its just if you add padding to the 'footer' style it displays different in various browsers (some add the padding value to the height, others dont) so the only way I have seen to fix this is to add a nested div and put the padding on that. I dont know if this is correct though because you end up with more and more nested divs?
|
|
||||
|
Re: padding content
Alright ... how about a link then so we can see what's going on?
|
|
||||
|
Re: padding content
Purists may gag, but you can ninja pad it.
Vertical: use <br class=> and use the class to set line-height. This is actually a nice touchup command, IMO. Horizontal: use <span class=> </span> and use fontsize and/or letterspacing in the class. This is less satisfactory due to control issues over font-size display, although if all you are trying to control is the padding per se (and not the fit) it will work fine with a fixed font unit like pt. Another old and REALLY noobie method is to use a transparent graphic as a spacer. Even I wouldn't do this, LOL. And for a third idea, with more "pure" css, if you can center-align the main div contents, you can pad every element except the left pad on the leftmost element and the right pad on the rightmost element, or you can have 0 horizontal padding on the content elements and use a padding spacer between them (which is frequently done with horizontal lists). This works very nicely as long as the line doesn't exceed the space, but again, it's vulnerable to user-determined font size. |
|
||||
|
Re: padding content
The world should be wrapped in <blink></blink> tags.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
![]() |
| Tags |
| positioning, padding, content |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Expandable Content Script (Swtich Content) | Matc | JavaScript Forum | 0 | Apr 8th, 2008 10:53 |
| Padding In IE | Monie | Web Page Design | 7 | Feb 12th, 2008 03:36 |
| Content Placement + Content Dividing | josephman1988 | Website Planning | 2 | Jan 22nd, 2008 05:02 |
| CSS padding Firefox vs IE | WL1207 | Web Page Design | 5 | Oct 18th, 2007 13:56 |
| Disappearing padding in IE | diagonalArgument | Web Page Design | 1 | Jan 8th, 2006 14:03 |