Board index PBase HTML and Style Sheets Aligning text to the right

HTML and Style Sheets

Aligning text to the right

Customize your galleries.
ilanphoto
 
Posts: 876

Aligning text to the right

Post Wed Jan 07, 2004 3:04 pm


Being from Israel, one of the disadvantages is that we write from right to left. In a web environment it is quite difficult :cry:

How can I align one block of text - English to the left and another block - Hebrew to the right?

Thanks
Ilan

alangrant
 
Posts: 861


Post Wed Jan 07, 2004 7:44 pm


Are these blocks of text within your gallery description? If so, there are several ways to do this.

One way is to enclose the block you want to right-align in paragraph <p> tags and use text-align, like this

Code: Select all
<p style="text-align: right">This is a test paragraph which will appear aligned to the right</p>


I had a quick look at your gallery and it looks like you are nearly there already - you just need to replace
Code: Select all
   <p style="color: black; margin-left: 20px">

with
Code: Select all
   <p style="color: black; margin-left: 20px; text-align:right">
Alan
Travel Photos - http://www.pbase.com/alangrant
Balkanology: Explore Southeast Europe - http://www.balkanology.com/

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Wed Jan 07, 2004 10:11 pm


alangrant wrote:you just need to replace
Code: Select all
   <p style="color: black; margin-left: 20px">

with
Code: Select all
   <p style="color: black; margin-left: 20px; text-align:right">


One small issue associated with using "p" and other similar classes in the codes is the extra line breaks you might end up with. If you don't want these line breaks, you should use something similar to
Code: Select all
<p style="color: black; margin-left: 20px; text-align:right; display:inline">

ilanphoto
 
Posts: 876


Post Thu Jan 08, 2004 7:50 am


Thank you both

My problem was that I was trying to use align = right as I had seen it used in the CSS so now I will try the text-align:

Thanks
Ilan

verti
 
Posts: 26


Post Sat Jan 24, 2004 11:28 am


Well I see you copied the scroller code from my gallery. Didn't you see the dir="rtl" attribute? Now you can put a dot at the end of each line...

Verti.

thewedding
 


Post Sat Jan 24, 2004 1:01 pm


you can also use, filter: flipV()

then it would be truly reading from left to right


Board index PBase HTML and Style Sheets Aligning text to the right

Who is online

Users browsing this forum: ClaudeBot and 0 guests