Jump to content

[SOLVED] Using CSS to display list of members


Mardoxx

Recommended Posts

				<div id="mainContent">
				<h3><span>Members</span></h3>
				<div id="members">
					<div id="memberOdd">
						<div id="pic"><img src="" /></div>
						<div id="text"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div>
					</div>

					<div id="memberEven">
						<div id="pic"><img src="" /></div>
						<div id="text"><p>Ut mauris mauris, ultrices eget vestibulum quis, euismod eget lacus.</p></div>
					</div>
				</div>

			</div>

 

 

I want it to display

 

image text

text image

image text

text image

 

It would be easy with tables, but how would I go about it using CSS? (which is a lot neater :P)

 

can anyone help me please?

 

Link to comment
Share on other sites

<div class="even">
  <img />
  <p>text</p>
</div>

<div class="odd">
  <img />
  <p>text</p>
</div>

<div class="even">
  <img />
  <p>text</p>
</div>

<div class="odd".
  <img />
  <p>text</p>
</div>

 

.even img
{
  float:left;
}

.odd img
{
  float:right;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.