By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,676 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,676 IT Pros & Developers. It's quick & easy.

inline blocks

P: n/a
Hello

Is it possible to make a block element inline?
By inline I mean put the whole block in one line
(i.e. not display: inline;).

like this: http://217.209.145.123/test.html
but with an actual block element and not a img.

One reason for trying to do this is to line up block
elements horizontally without using absloute
positioning or float. Is there another way to do this?

Thanks
/Christoffer
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article Christoffer Berg wrote:
Hello

Is it possible to make a block element inline?
display:inline-block; by CSS21, display:inline-table has practically same
effect, and part of CSS2.
By inline I mean put the whole block in one line
(i.e. not display: inline;).

like this: http://217.209.145.123/test.html
but with an actual block element and not a img.

I suggest:
{display:inline-table;display:inline-block;}

First is supported by Opera 6+ and is part of CSS2, second by Opera 7 and
hopefully Moz and other developing browsers sooner or later, maybe after
CSS21 has been accepted.
One reason for trying to do this is to line up block
elements horizontally without using absloute
positioning or float.


Works nicely, but browser support is pretty limited. But it is usually
easy to make it degrade nicely, using floats, or just doing nothing.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.