Oznámení

Provoz fóra byl ukončen

center div with images, url and desc

před 11 lety

ubitux
Člen | 2

Before I start, sorry for the use of English ; I can only speak French & English.

Jak problém reprodukovat

– texy-2.0-beta2
 – PHP 5.2.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 16 2007 02:21:38)

I was looking for having a center div contening image, with a link and a description.

This is what the prototype of what I tried :

.<>
[* image.png *]:file *** desc

So I would like to have my div and desc, or at least the div

Očekávaný výsledek

<div style="width:346px" class="figure">
<a href="file">
<img src="image.png" alt="" width="336" height="252" /></a>
<p>desc</p>
</div>

Skutečný výsledek

<div style="width:346px; margin:auto" class="figure">
<a href="file">
<img src="image.png" alt="" width="336" height="252" /></a>
<p style="text-align:center">desc</p>
</div>

Thanks !

před 11 lety

David Grudl
Nette Core | 6806

Try this:

[* image.png *]:file *** desc .<>

před 11 lety

ubitux
Člen | 2

This works correctly to center the description, but not to center the whole thing.

I tried this :

.<>
[* image.png *]:file *** desc .<>

But without any success.

Editoval ubitux (10. 8. 2008 6:31)

před 10 lety

Podvečerníček
Člen | 15

I guess, only

<div style=„text-align:center;“>
whatever
</div>

will do :-/