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