This is a discussion on "spacing around images" within the Web Page Design section. This forum, and the thread "spacing around images are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
spacing around images
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|
|
||||
|
Re: spacing around images
You have a few options here:
The most direct approach would be to place the image in a div with the dimensions of your image and give it the necessary margins and float if required depending on your placement. i.e. #foo { width: 200px; height:200px; float:left; margin:12px; } or #foo img { } may work too.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
|||
|
Re: spacing around images
If this a consistent requirement throughout the site then set css margins directly on the img tag.
|
|
||||
|
Re: spacing around images
That works too.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
|||
|
Re: spacing around images
If you use global margins for the img tag, the margins will be added to all imgs and they will look indented when the text wraps underneath during a left or right float.
You need to establish two styles. One for right floats and one for left floats. You want margin on the right and bottom sides during a left float and margins on the left and bottom sides during a right float.
|
![]() |
| Tags |
| spacing, around, images |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Css Spacing Help! | RZX Developer | Web Page Design | 5 | Aug 13th, 2007 12:26 |
| Spacing paragraphs | polkadot | Starting Out | 3 | May 25th, 2007 12:48 |
| Some images overlapping and some spacing problems | karinne | Web Page Design | 4 | Feb 15th, 2007 13:35 |
| Spacing help in Dreamweaver 8 | facehead | Web Page Design | 23 | Dec 1st, 2006 18:09 |
| div spacing | johnnybravo | Web Page Design | 13 | Sep 6th, 2006 12:06 |