మూస:Block right/s
This template uses block elements, e.g. See H:DIVSPAN for details. |
This template uses TemplateStyles: |
Usage
[మార్చు]This template places a block of text in the right of the page, without affecting the text alignment within that block.
- Comparison of {{Block right}} and {{right}}
This template retains the current text alignment (usually left), but moves the entire block of text into the right. To change to right text alignment, use {{right}} instead.
- Block right
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aenean commodo ligula eget dolor.
Aenean massa.
- Right
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aenean commodo ligula eget dolor.
Aenean massa.
Parameters
[మార్చు]All parameters are optional.
- width set the width of the block
- offset set the distance ("indent") from the right margin
- gutter set the gap between the normal content and the block
- align set the internal alignment of the block
- collapse remove gaps between paragraphs inside the block
- style add other kinds of style
Width
[మార్చు]Where there is a requirement to fix the width of the block, an optional width parameter can be used. Avoid px units and prefer a text-relative unit such as em when the content is textual[1].
Example
{{block right|width=25em|Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br/> Aenean commodo ligula eget dolor. Aenean massa.}}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aenean commodo ligula eget dolor.
Aenean massa.
Offset
[మార్చు]To offset the entire block back from the right margin, an optional offset parameter may be used:
Example
{{block right|offset=4em|Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br/> Aenean commodo ligula eget dolor. Aenean massa.}}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aenean commodo ligula eget dolor.
Aenean massa.
Gutter
[మార్చు]To specify the gap between normal content and the right-floated content, use the gutter parameter:
Example
{{right block | width=50% | gutter=10em | align=center | [[File:Traffic-signs-manual-chapter-3-diagram 622-2 (2008).svg]] }} {{lorem ipsum}}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
To align the content of the right-aligned block within the block, an optional align parameter may be used:
Example
{{block right|align=center|Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br/> Aenean commodo ligula eget dolor. Aenean massa.}}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aenean commodo ligula eget dolor.
Aenean massa.
Collapse
[మార్చు]To remove vertical spacing between paragraphs inside the block (for example, when you want a centered line, and the right-aligned line[2]), the collapse parameter may be used:
Example
{{lorem ipsum}} {{block right|collapse=y|width=20em| {{center|Centered text goes here}} Left-aligned text goes here {{right|Right-aligned text goes here}} }}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Centered text goes here
Left-aligned text goes here
Right-aligned text goes here