HighDots Forums  

block element inside inline element2

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss block element inside inline element2 in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ste.paoletti@tiscali.it
 
Posts: n/a

Default block element inside inline element2 - 01-21-2006 , 06:55 AM







Hi.
The code of my page is generated by script. However the code is the
following (I write it manually, sorry if there are some errors):
<span class="question">
<span class="number">1</span>
<span class="content"> Here can stay span with text childNode, image,
animation,etc..</span>
</span>

The question span is display block.
I want the number and the firstchild of the content in the same line.
The best thing to do is set the display:block property of the content
span and also the position:relative and use top and left property to
align the block of content with the number.(all the content is
display:block)
But in this way I have some problems whit the application so it don't
work (the cause is position:relative).
So, I have try whit number and content display:inline, the firstChild
of the content also display:inline, and the rest of the content
display:block.
In this way I have block elements (the second, third,... child of the
content span) inside a inline element (the content span).
It should work only on mozilla(1.6 or later) and firefox.
The xhtml is valid or not?
It is correct?
Thanks


Reply With Quote
  #2  
Old   
Gus Richter
 
Posts: n/a

Default Re: block element inside inline element2 - 01-22-2006 , 02:02 AM






ste.paoletti (AT) tiscali (DOT) it wrote:
Quote:
The xhtml is valid or not?
It is correct?
Jim Moe already told you in the previous thread that the HTML (or XHTML)
is correct and valid. The SPAN will always be inline even if you ask it
to be displayed as a block or whatever. You may nest as many inline
elements as you wish.

<!ELEMENT SPAN - - (%inline* -- generic language/style container -->

--
Gus



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.