473,386 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

block element inside inline element2


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

Jan 21 '06 #1
2 1352
st**********@tiscali.it wrote :
Hi.
The code of my page is generated by script. However the code is the


Why did you create another thread, therefore duplicating the first
thread? Why did you need to fragment an already started discussion on
your issue or problem? Where exactly do you want to get answers, replies?

Gérard
--
remove blah to email me
Jan 22 '06 #2
st**********@tiscali.it wrote:

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

Jan 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Thomas Jollans | last post by:
I would like to have something like this: <a:element1 xmlns:a="..."> <a:element2> <b:element1 xmlns:b="..."> <b:element2/> </b:element1> </a:element2> </a:element1>
3
by: Aaron | last post by:
Hi, I'm trying to use style sheets instead of tables for layout, but I'm not sure on how to do something... I have a div (100% width) containing 3 other divs. Each needs to be lined up next to...
7
by: Zhang Weiwu | last post by:
Hello. This is problem puzzled me a long time. I wish to organize some block elements and let them flow one after each other like text. Think about a album, I wish the album have 12 thumbnails,...
3
by: Markus Ernst | last post by:
Hello Reading the follwing document: http://www.w3.org/TR/WD-positioning-970131#In-flow it seems very clear that position:relative should be relative to the parent element. So in the following...
4
by: Axel Dahmen | last post by:
Hi, current browsers don't support "display: inline-block;" and "display: inline-table;", resp. Thus I'm using "float: left;" to achieve a similar effect. Problem is that if a row of elements...
12
by: Eric Lindsay | last post by:
I'm trying to learn how to read a DTD I wanted to use, http://www.w3.org/TR/html4/strict.dtd to ensure I was treating each element correctly in terms of being block, inline, or flow (either). ...
6
by: ste.paoletti | last post by:
hi, I have read that browsers support block element inside inline element but the css is not valid. Someone can tell me more about? What do you think? Thanks.
26
by: Bill Norton | last post by:
If you wrap one division around another like this: <div id="wrapper"> <div id="child">...</div> </div> ....the wrapper division will be considered the containing block of the child division...
5
by: SuneR | last post by:
Hi, I am having problems figuring out how to make Firefox behave, and output the HTML I want it to output. The thing I want done is actually quite simple. I have a <labeltag, and inside it, I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.