css question

H

Howard

<div style="display:inline">
<h2>List 1</h2>
<h4><a href="/listitem/">item 1</a></h4>
<h4><a href="/listitem/">item 2</a></h4>
<h4><a href="/listitem/">item 3</a></h4>
</div>

<div style="display:inline">
<h2>List 2</h2>
<h4><a href="/listitem/">item 1</a></h4>
<h4><a href="/listitem/">item 2</a></h4>
<h4><a href="/listitem/">item 3</a></h4>
</div>


I can't get the two lists side by side

List 1 List 2
item 1 item 1
item 2 item 2
item 3 item 3

Please help,
thanks,
Howard
 
T

Tasos Vogiatzoglou

Use table-cell as the display attribute inside a block box altough not
wise to alter the box model in such a way.

You can also use positional attributes and float.

Regards,
Tasos
 
H

Howard

I can only get table-cell to work in firefox.
I tried everything with positional attributes and float before I posted this
question.
It seems so simple, I've been stuck on this problem for days now!
 
T

Tasos Vogiatzoglou

<div style="display:inline;position:absolute;float:left">
<h2>List 1</h2>
<h4><a href="/listitem/">item 1</a></h4>
<h4><a href="/listitem/">item 2</a></h4>
<h4><a href="/listitem/">item 3</a></h4>
</div>

<div style="display:inline;position:absolute;float:left;left:200px">
<h2>List 2</h2>
<h4><a href="/listitem/">item 1</a></h4>
<h4><a href="/listitem/">item 2</a></h4>
<h4><a href="/listitem/">item 3</a></h4>
</div>

This should work (but I don't know if this is what you want).

Regards,
Tasos
 
A

Alan Silver

Howard said:
I can only get table-cell to work in firefox.

Correct, IE doesn't support them (like most of CSS!!)
I tried everything with positional attributes and float before I posted this
question.
It seems so simple, I've been stuck on this problem for days now!

I would suggest you ask in a CSS newsgroup. This is an ASP.NET group, so
most people here are not experts in CSS.

Try news:comp.infosystems.www.authoring.stylesheets

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top