PC Applications forum

General discussion

Aligning with HTML

Regarding HTML, just wondering if anyone knows how to, within a single cell of a table, align half of one line of text left, and the other right... Centre aligning is easy, but I'm not certain how to left and right align without using tags such as <p> which cause other problems.

Discussion is locked
You are posting a reply to: Aligning with HTML
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Aligning with HTML
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re: aligning

In reply to: Aligning with HTML

I tried do <div>'s with style="text-alignment: left" and style="text-alignment: right" in one cell, but like <p> it goes to a new line. You can more or less undo it with relative positioning, but the result would be dependent on screen resolution and character size, I think, so it's not a good idea.
And alignment doesn't work with <span>, I found out.

So I think the only way is to use two cells, one left aligned and one right aligned and play with border-styles to hide the border in between. The visual effect would be one cell with some text left and some text right. And the visual effect is what matters, not the inner workings.


Collapse -
many thanks

In reply to: Re: aligning

Thanks for your help!

Popular Forums

Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


This one tip will help you sleep better tonight

A few seconds are all you need to get a better night's rest.