You are here: Re: Images with borders « HTML « IT news, forums, messages
Re: Images with borders

Posted by Steve Pugh on 10/07/25 11:43

Stuart Palmer wrote:

> I am trying to set a stylesheet so my images (or various size) can be
> centrally aligned and have a border round them. My problem is that I can't
> seem to achieve this in both firefox and IE, because I also want about a 2px
> which space round the image before the border.
>
> My solution I have works well for float left and right in IE and firefox,
> but as there is no 'float:middle' if I try and set my div and text-align the
> image the div/border spans the whole width of the content space and the
> imageis sitting in the middle - nicely bordered top and bottom, but not left
> and right.

<div class="gallery"><img src="foo" alt="bar" /></div>

..gallery {text-align: center;}
..gallery img {padding: 2px; border: 3px double black;}

Steve

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация