Semantic Ui | container can be created by adding .ui
& .container
class to the standard container base class.
Source Code
<div class="ui container">
<h2>Learn Semantic UI Container!</h2>
<p>Learn semantic ui concept by sudhakarinfotech.com</p>
</div>
Source Code : Output
Learn semantic ui concept by sudhakarinfotech.com
To create a text container, add the ui text container
class to the text container base class.
Source Code
<div class="ui text container">
<p>Welcome to sudhakarinfotech.com</p>
</div>
Source Code : Output
Welcome to sudhakarinfotech.com
The fluid container covers all the available widths. It will be created by adding a fluid container
class to the container base class..
Source Code
<div class="ui fluid container">
<p>This is a fluid container.</p>
</div>
Source Code : Output
This is a fluid container.
There are the following predefined classes that are used to align text inside the container.
left aligned
- It is used to align text on the left side of the container.right aligned
- It is used to align text on the right side of the container.center aligned
- It is used to align text in the center of the container.justified
- This adds the justified alignment.Source Code
<div class="ui left aligned container">
<p>This is a left aligned text content.</p>
</div>
Source Code : Output
This is a left aligned text content.
Source Code
<div class="ui center aligned container">
<p>Center Aligned text.</p>
</div>
Source Code : Output
Center Aligned text.
Source Code
<div class="ui right aligned container">
<p>Right Aligned Text.</p>
</div>
Source Code : Output
Right Aligned Text.
Source Code
<div class="ui justified container">
<p>Justified Alignment.</p>
</div>
Source Code : Output
Justified Alignment.