Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to Put Both Left-Justified Text and Right-Justified Text on the Same Line?

Reply
Thread Tools

How to Put Both Left-Justified Text and Right-Justified Text on the Same Line?

 
 
jaykchan@hotmail.com
Guest
Posts: n/a
 
      06-28-2005
I would like to know whether there is a way to put left-justified line
and right-justified line in the same line. I am trying to format the
report heading in a way that I have left-justified text and
right-justified text flanking the left and right sides of the report
heading. Because the web page is dynamically generated and each user's
screen can be different, I cannot pre-define the report heading as a
static web page.

I have tried using the 'align' attribute in <p> or <div>. But this
doesn't work because the left-justified text and the right-justified
text will always be placed in two different lines, and I want them to
be on the same line.

I have also tried to put them in a bordless table. But I have already
had a large table in the body of the web page that will be larger than
the bordless table; this means the bordless table will not be covering
the full width of the web page, and I cannot achieve the effect of
having left-justified text and right-justified text.

Any idea?

Thanks in advance for any information.

Jay Chan

 
Reply With Quote
 
 
 
 
Ian Rastall
Guest
Posts: n/a
 
      06-28-2005
On 28 Jun 2005 12:09:50 -0700, wrote:

>I have tried using the 'align' attribute in <p> or <div>. But this
>doesn't work because the left-justified text and the right-justified
>text will always be placed in two different lines, and I want them to
>be on the same line.


Perhaps something like:

<div class="left" style="float: left;">Some text</div>
<div class="right">Some more text</div>

HTH

Ian
--
Was it not a comedy, a strange and stupid
matter, this repetition, this running around
in a fateful circle? (Hermann Hesse)
http://www.bookstacks.org/
 
Reply With Quote
 
 
 
 
AF
Guest
Posts: n/a
 
      06-29-2005
On Tue, 28 Jun 2005 16:14:12 -0400, Ian Rastall <>
wrote:

>On 28 Jun 2005 12:09:50 -0700, wrote:
>
>>I have tried using the 'align' attribute in <p> or <div>. But this
>>doesn't work because the left-justified text and the right-justified
>>text will always be placed in two different lines, and I want them to
>>be on the same line.

>
>Perhaps something like:
>
><div class="left" style="float: left;">Some text</div>
><div class="right">Some more text</div>
>
>HTH
>
>Ian


Ian,

I tried your suggestion in both FrontPage and hand coded, and it did
not work.


Best regards,

Al
http://www.affordablefloridainsurance.com
http://www.americanbestmortgages.com
http://www.americanaffordablelifeinsurance.com
 
Reply With Quote
 
Ian Rastall
Guest
Posts: n/a
 
      06-29-2005
On Wed, 29 Jun 2005 02:28:41 GMT, AF <bscinc3000@Yahoo_NoSpam.com>
wrote:

>On Tue, 28 Jun 2005 16:14:12 -0400, Ian Rastall <>
>wrote:
>
>>Perhaps something like:
>>
>><div class="left" style="float: left;">Some text</div>
>><div class="right">Some more text</div>

>
>I tried your suggestion in both FrontPage and hand coded, and it did
>not work.


Do you have anything in your CSS for the .left and .right classes that
I refer to in there? If not, you might try:

<div style="float: left; text-align: left;">Some text</div>
<div style="text-align: right">Some more text</div>

If that doesn't work ... I'm out of ideas!

Ian
--
Was it not a comedy, a strange and stupid
matter, this repetition, this running around
in a fateful circle? (Hermann Hesse)
http://www.bookstacks.org/
 
Reply With Quote
 
AF
Guest
Posts: n/a
 
      06-29-2005
On Tue, 28 Jun 2005 22:39:10 -0400, Ian Rastall <>
wrote:

>On Wed, 29 Jun 2005 02:28:41 GMT, AF <bscinc3000@Yahoo_NoSpam.com>
>wrote:
>
>>On Tue, 28 Jun 2005 16:14:12 -0400, Ian Rastall <>
>>wrote:
>>
>>>Perhaps something like:
>>>
>>><div class="left" style="float: left;">Some text</div>
>>><div class="right">Some more text</div>

>>
>>I tried your suggestion in both FrontPage and hand coded, and it did
>>not work.

>
>Do you have anything in your CSS for the .left and .right classes that
>I refer to in there? If not, you might try:
>
><div style="float: left; text-align: left;">Some text</div>
><div style="text-align: right">Some more text</div>
>
>If that doesn't work ... I'm out of ideas!
>
>Ian


Ian,

You are right.

I missed the "class" and css implications in your first example.
Sorry. I most humbly apologize.

I just tried your second example, and it worked beautifully.

When I have a little more time, I will try your css example, but it
looks like it will work.

Again I apologize for my mistake.

And I sincerely appreciate the lesson in html and css you have given.


Best regards,

Al
http://www.affordablefloridainsurance.com
http://www.americanbestmortgages.com
http://www.americanaffordablelifeinsurance.com
 
Reply With Quote
 
Ian Rastall
Guest
Posts: n/a
 
      06-29-2005
On Wed, 29 Jun 2005 11:29:15 GMT, AF <bscinc3000@Yahoo_NoSpam.com>
wrote:

>I missed the "class" and css implications in your first example.
>Sorry. I most humbly apologize.


It's no big deal. Glad it worked out for you!

Ian
--
Was it not a comedy, a strange and stupid
matter, this repetition, this running around
in a fateful circle? (Hermann Hesse)
http://www.bookstacks.org/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compilation error: file exists in both in both 'c:\WINNT\Microsoft.NET\Framework\v2.0.50727 ABCL ASP .Net 0 05-29-2008 04:59 PM
why does the following with Queue, q.put('\x02', True) not put itin the queue? Gabriel Rossetti Python 3 04-25-2008 03:41 PM
2 computers, both online, both invisible to each other ? b Computer Support 9 04-21-2006 04:06 AM
VRF question - both private and external Internet networks on same router. Rob Cisco 7 01-21-2005 11:48 AM
Regular Expression syntax: Same textbox - both text and numbers. Sreedhar Vankayala ASP .Net 2 12-04-2004 03:02 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57