Вопрос

http://img.cmsszablony.pl/images/2014/02/12/paragraphs_helps.png - image to help

How to add margin left and right on both sides and middle text in line with text on right side? Please answer my question.

This is my code HTML:

<div class="row1 gensmall wrap">        
<p class="alignleft">{TOTAL_USERS_ONLINE}<br />{TOTAL_USERS}{TOTAL_FEMALE}{TOTAL_MALE}{COUNTER}</p> 
<p class="alignright">{POSTED_TODAY}<br />{USERS_OF_THE_DAY_LIST} {USERS_OF_THE_DAY_COUNT}</p>
</div>

And CSS:

.wrap {
display: table;
width:100%;
}
.alignleft {
    float: left;
}
.alignright {
    float: right;
    text-align:right;
}

Please to help me.

Это было полезно?

Решение

I'm not sure if this is what you want.

Sample

just add this in your CSS

p{
    margin:10px;
}

Note: Just resize the window if the text breaks.

Другие советы

Sounds like it would be easier to add padding to the container:

.row1 { padding: 0 20px }

As far as aligning the text, I'm not sure what you need.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top