aligning 2 divs side by side

I've seen a lot of these questions asked but none answered my question. I'm trying to align 2 divs side by side. The divs have the same class as they are pulled dynamically with php. I can't figure out how to align it! Here's the code:

<div class="holder">
<a href="#" class="item">
</a>
<a href="#" class="item">
</a>
</div>

.holder {
float:left;
width:40%;
margin: 0 10px 0 0; 
}

.item {
padding:7px;
display:block;
text-decoration:none;
margin:0 0 15px;
}

Answers


Use display:inline-block

.item {
padding:7px;
display:inline-block;
text-decoration:none;
margin:0 0 15px;
}

Fiddle Demo

or display:inline

.item {
padding:7px;
display:inline;
text-decoration:none;
margin:0 0 15px;
}

Fiddle Demo


.holder {
  float:left;
  width:40%;
  margin: 0 10px 0 0; 
}
.item {
  padding:7px;display:inline;
  text-decoration:none;
  margin:0 0 15px;
}

http://jsfiddle.net/3WZaf/


Need Your Help

Using FLVPlayback control - need to load policy file

actionscript-3 flash flvplayback

I simply need to play a video using the FLVPlayback control, but also need to generate BitmapData from it so I need to load a policy file but cannot find any way to do it! It seems so simple, but ...

How define several elements with same name, but different type in xsd:choice element?

xml xsd

Is it possible in some way, to define an xsd scheme which could validate such xml: