# CSS Gallery/thumbnail alignment issue

**URL:** https://forum.kirupa.com/t/css-gallery-thumbnail-alignment-issue/228691
**Category:** web dev
**Created:** [June 10, 2007, 4:48pm UTC](https://forum.kirupa.com/t/css-gallery-thumbnail-alignment-issue/228691 "2007-06-10T16:48:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DeringerColt](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@DeringerColt](https://forum.kirupa.com/u/DeringerColt)
#### Post date: [June 10, 2007, 4:48pm UTC](https://forum.kirupa.com/t/css-gallery-thumbnail-alignment-issue/228691/1 "2007-06-10T16:48:08Z")

</div>

Hi all, I am trying to create a simple thumbnail gallery but Im have a small issue, everytime you click on the thumbs under the identity banner the web banner moves.

I have attached the CSS and HTML, I know that creating a seperate div for each heading is bad practise.

Cheers

Deringer

CSS

```auto

div.wrapper
{
width:470px;
height:305px;
float:left;
}
div.text
 {
text-align:left;
padding:5px;
}
div.img
  {
  margin: 20px;
  height: auto;
  width: auto;
  float:left;
  padding:0px;
  text-align: left;
  border:1px solid grey;
  }
div.img img
  {
  display: inline;
  margin: 0px;
  border: 1px solid #ffffff;
  }
div.img a:hover img
  {
  border: 1px solid #0000ff;
  }

```

HTML

```auto

<div class ="wrapper"><div class ="text"><p><b>Identity</b></p></div><div class="img"> <a target="_blank" href="images/RIproducts.jpg"> <img src="images/galthumb1.gif" alt="thumbnail" width="50" height="50" /> </a></div><div class="img"> <a target="_blank" href="images/"> <img src="images/galthumb2.gif" alt="thumbnail" width="50" height="50" /> </a></div><div class="img"> <a target="_blank" href="images/"> <img src="images/galthumb3.gif" alt="thumbnail" width="50" height="50" /> </a></div><div class="img"> <a target="_blank" href="images/"> <img src="images/galthumb4.gif" alt="thumbnail" width="50" height="50" /> </a></div><div class="img"> <a target="_blank" href="images/"> <img src="images/galthumb5.gif" alt="thumbnail" width="50" height="50" /> </a></div><div class ="text"><p><b>Web Design</b></p></div><div class="img"> <a target="_blank" href="images/"> <img src="images/galthumb6.gif" alt="thumbnail" width="50" height="50" /> </a></div></div>

```
