Solved: CSS Float Not Working

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

MMJ

Thread Starter
Guest
Joined
Oct 15, 2006
Messages
3,625
I want three images to be lined up next to each other without using a table.

<img class="leftfloat" src="image.jpg" />
<img class="rightfloat" src="image.jpg" />
<img class="rightfloat" src="image.jpg" />

CSS:

.rightfloat
{
float:right;
}

.leftfloat
{
float:left;
}

=====

The images just line up under each other.

So what am I doing wrong? Is there a simpler way to do this?
 

MMJ

Thread Starter
Guest
Joined
Oct 15, 2006
Messages
3,625
Ok, it seems like clear:both; was disabling it. Thanks a bunch. :)
 

MMJ

Thread Starter
Guest
Joined
Oct 15, 2006
Messages
3,625
Ok, how do I center three images next to each other?

<div align="center"> isn't working for me. :(

---

Some other CSS must be clashing with it.

Edit:
Yeah, that was the problem.

===========

Is there a way to increase the space between images without increasing the padding?
 
Joined
Aug 7, 2005
Messages
2,183
style="margin-left: auto; margin-right: auto;" :)

That tells your browser to set the margins so that they are both equal and so the thing is centered. :)
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top