I want to put a seconf line of text below the word "state". For some reasons the second line of the text (red's "brain") has been kept down from the circle Do you know what is the reason for this huge gap and how to fix it? Was not suitable to use? Thanks
HTML
& lt; Div class = "circle text color 2 color 2-box-shadow" & gt; State & lt; Br> & Lt; Span & gt; Of the & lt; / Span & gt; & Lt; / Div & gt;
CSS:
.circle {boundary-radius: 50%; Swim left; Display: Inline-block; Margin-right: 20px; / * Text Styling * / Font-Size: 45px; Width: 220 pixels; Height: 220 pixels; Color: #fff; Border: 2px solid #fff; Line-height: 220 pixels; Text align: center; Font-family: aerial; } .color-1 {background: # DD4814;} .color-2 {background: # aaa97f; } .color-3 {background: # 5 e 2750; } .color1-box-shadow {box-shadow: 0px 0px 1px 1px # DD4814} .color2-box-shadow {box-shadow: 0px 0px 1px 1px # aea79f} .color3-box-shadow {box-shadow: 0px 0px 1px 1px # 5E2750}. Cercle span {color: red; Font-size: 22px; }
line-height
vertical center doesn 'text Does not work with many rows.
If the height and width of the circle have been fixed, make some of the height between the upper and lower padding to make the text center in the middle.
Display: Block
given
Example of work
and
can be removed.
.circle {boundary-radius: 50%; Swim left; Display: Inline-block; Margin-right: 20px; / * Text Styling * / Font-Size: 45px; Width: 220 pixels; Height: 80px; Padding: 70px 0; Color: #fff; Border: 2px solid #fff; Text align: center; Font-family: aerial; } .color-1 {background: # DD4814; } .color-2 {background: # AEA79F; } .color-3 {background: # 5 e 2750; } .color1-box-shadow {box-shadow: 0px 0px 1px 1px # DD4814} .color2-box-shadow {box-shadow: 0px 0px 1px 1px # aea79f} .color3-box-shadow {box-shadow: 0px 0px 1px 1px # 5E2750}. Cercle span {color: red; Font-size: 22px; Display: block}
& lt; Div class = "circle text color-2 color 2-box-shadow" & gt; State & lt; Period & gt; Of the & lt; / Span & gt; & Lt; / Div & gt;
Comments
Post a Comment