Problemi coi Divs

Aggiunta di un indicatore <p> con il testo

Il motore di WikiDOT inquadra sistematicamente il testo libero con degli indicatori <p>...</p> (paragraphe). Il codice seguente:

[[div]]
Un po' di testo.
[[/div]]

Sarà interpretato come:

<div>
<p>Un po' di testo.</p>
</div>

nel codice HTML finale.

Questo non semprerebbe un problema importante, tuttavia supponete di voler realizzare una barra di navigazione,in una pagina in alto, di un div:

Ancora testo.

Come si può constatare questa trasformazione aggiunge degli spazi sopra e sotto il testo.

Una solutione possibile

Una solutione possibile consiste nell'utilizzo dell'indicatore [[span]] in luogo dell'indicatore [[div]] aggiungendo la proprietà display a block

[[span style="display:block;border:1px solid #000;"]]Un po' di testo[[/span]]

Ecco il risultato che si ottiene:

Un po' di testo.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /