Forcing images to not wrap

Posted by Mohammad on Stack Overflow See other posts from Stack Overflow or by Mohammad
Published on 2010-06-09T23:55:28Z Indexed on 2010/06/10 0:02 UTC
Read the original article Hit count: 285

Filed under:
|
|
|
|

I can't touch the html theme but I have access to the css files.

<div class="photos">
    <img src="a.jpg" alt="" align="left" /> 
    <img src="b.jpg" alt="" align="left" />
    <img src="c.jpg" alt="" align="left" />  //align makes the images wrap
</div>

Unfortunately I can't remove align="left" from the images otherwise this CSS snippet would have done the job

.photos{
    white-space: nowrap;
}
.photos img{
    display: inline;
    vertical-align: top;
}

Any ideas? Is it even possible to make these images line-up horizontally without using the force of a table and only with CSS?
Many Thank in advance!

© Stack Overflow or respective owner

Related posts about html

Related posts about css