Aligning Text, Images and Divs

Overview:

You can center an image in a div the same way you center text or images with the equals sign:

Text:

Code:

= centered text

In Action:

centered text


Images:

Code:

= [[image en:center-an-image-in-a-div/an-image.jpg]]

In Action:

an-image.jpg


Image inside a Div:

Code:

[[div style="width:300px;border:1px solid #000;"]]
= [[image en:center-an-image-in-a-div/an-image.jpg]]
[[/div]]

In Action:

an-image.jpg


Divs:

Use '<', '=', or '>' to align the object left, center or right respectively.

Code:

[[<image an-image.jpg]]

In Action:

an-image.jpg

Code:

[[=image an-image.jpg]]

In Action:

an-image.jpg

Code:

[[>image an-image.jpg]]

In Action:

an-image.jpg

Alternatively, instead of '</=/>', you may use 'text-align' variable in the style of divs.

Code:

[[Div style="text-align: right;"]]
[[image an-image.jpg]]
…."> " : right ….
[[/div]]

In Action:

an-image.jpg
…."> " : right …..

Bookmark and Share

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License