PDA

View Full Version : Right-align question



SteveH
Feb 3rd, 2010, 05:52 PM
Hello

I have the date showing on a Web page which is right-aligned. This is what achieves it:

<p style="text-align:right;">
<%
ASP code here which displays the date
%>
</p>

However, the date is so right-aligned that it would not be possible to squeeze a cigarette paper between it the right-edge of the Web page.

How would I allow a little space there, please, of, say a quarter of an inch?

Thank you.

Steve

ahayzen
Feb 3rd, 2010, 05:59 PM
margin-right:5px;
Put this in the <p style

this will give a 5pixel margin.

Andy

SteveH
Feb 3rd, 2010, 06:26 PM
Hello ahayzan

Thanks for your reply.

I have done this:


<style type="text/css">

p
{
text-align:right;
margin-right:5px;}

</style>

<p>

<%
ASP
%>
</p>


But it still looks tightly nested against that frame!

Cheers

Steve

ahayzen
Feb 3rd, 2010, 06:44 PM
ok maybe try using

padding-right:5px;
Or you might have to put another div around the object.

Andy

fball
Feb 5th, 2010, 05:43 AM
The padding-right should work, but if it doesn't try this:


<p style="text-align:right;">
<%
ASP code here which displays the date
%>

&nbsp;&nbsp;&nbsp;&nbsp;

</p>

SteveH
Feb 5th, 2010, 11:02 AM
Hello fBall

Thanks for your post.

I'm sure that does work, but how would I allow a little space there, please, of, say a quarter of an inch between the text and the frame?

You can see what I mean here:

http://proofreading4students.com/index.asp

Thanks.

Steve

abduraooft
Feb 5th, 2010, 11:21 AM
<p style="text-align:right;padding-right:10px;">
<%
ASP code here which displays the date
%>
</p>

SteveH
Feb 5th, 2010, 12:31 PM
Oh, yes, that's done it! Only a little thing I know and maybe I'm too fussy, but it looks so much better.

Very many thanks!

Steve