W3C home > Mailing lists > Public > www-style@w3.org > April 2002

block inside inline

From: Christian Ottosson <christian@ottosson.name>
Date: Thu, 18 Apr 2002 12:29:01 +0200
Message-Id: <a05100300b8e44ac79e0b@[212.105.36.147]>
To: www-style@w3.org
I have searched the CSS 2 recommendation in order to find out whether 
or not an element can have the property "display: block" inside an 
element who has the property "display: inline". I can't see why it 
couldn't, but I can't find any statement about it in the 
recommendation and the browser I have tested it with (Mozilla, Opera, 
MSIE on Mac) don't like it.


In case you want to know, I'm trying to place an image next to a 
centered text broken into two lines with

CSS:
div {text-align: center;}
img {display: inline;}
h1 {display: inline;}
span {dipslay: block;}

XHTML:
<div>
   <img src="..." alt="..." />
   <h1><span>Elim</span> <span>Stockholm</span></h1>
</div>

Wished result:
    ___________________________________
   |          XX    Elim               |
   |          XX Stockholm             |
   |___________________________________|

-- 
Christian
--------------------------------------------------
  /"\
  \ /
   X  ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
  / \
--------------------------------------------------
Received on Thursday, 18 April 2002 07:10:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:14 GMT