Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / October 2003



Tip: Looking for answers? Try searching our database.

inline blocks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christoffer Berg - 28 Oct 2003 21:04 GMT
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
Lauri Raittila - 28 Oct 2003 21:54 GMT
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.

Signature

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.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.