Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set space between elements - margin top/bottom

Is there any semantic ui class to put space (top/bottom) between components or I have to use css styles? Eg. Between two segments or between a header and a cards group, etc etc..

like image 832
alex Avatar asked Sep 06 '18 08:09

alex


People also ask

How can we set margins for an element?

Answer: You can set the margin property to auto to horizontally center the element within its container. The element will then take up the specified width, and the remaining space will be split equally between the left and right margins.

Should I use margin bottom or margin-top?

Solution: Always Use Top Margin! The reason is related to the 'C' in CSS.

How do you put a space in a margin in HTML?

The margin property sets or returns the margins of an element. This property can take from one to four values: One value, like: div {margin: 50px} - all four margins will be 50px. Two values, like: div {margin: 50px 10px} - the top and bottom margins will be 50px, left and right margins will be 10px.

Does setting margin-top and margin bottom have an effect on an inline element?

Top and bottom margins do not affect inline elements because inline elements flow with content on the page. You can set left and right margins/padding on an inline element but not top or bottom because it would disrupt the flow of content.


1 Answers

Yes there is. You have to use the hidden and divider classes.

<div class="ui hidden divider"></div>
like image 102
Ray Avatar answered Nov 15 '22 07:11

Ray