Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HTML Font alignment

Former Member
0 Likes
1,363

Hi All.

I am using the FM WWW_HTML_FROM_LISTOBJECT to convert my list to HTML.

Users want to change the font to ARIAL.

So I changed the template in SMW0 to change the font. But then all my alignment got lost.

I then coded 2 test HTML scripts to see how font behaves. Here is it :

<HTML>

<HEAD> </head>

<body>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<font face="Courier" size="2.0"> Testing font

&nbsp;&nbsp;&nbsp;&nbsp; Second column

<br>

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

2nd row test &nbsp;&nbsp;&nbsp;&nbsp; second column

</body>

</html>

Re-run the above script changing the face to ARIAL and you'd see a different alignment.

Now, is there any way to preserve my alignment so that even if I change the font face, my alignment remains the same. I tried <PRE> tag, but doesn't work. Any clues anyone please?

Thanks in adv.

1 ACCEPTED SOLUTION
Read only

sridhar_k1
Active Contributor
0 Likes
1,151

Loosing alignment because Courier is monospaced and arial is not, Try Changing the font to "Arial monospaced for SAP" instead of "Arial".

Regards

Sridhar

6 REPLIES 6
Read only

Former Member
0 Likes
1,151

Hi Friends.

Anyone can shed some clues on this please?

Thanks again.

Read only

0 Likes
1,151

hi,

This is my assessment on your question, it's because font ARIAL is not monospaced. Meaning, its letter width is not equal to one another. For example, width of letter 'O' is not equal to the width of letter 'l'. That is why the alignment was disarranged so to speak, unlike list reports which have monospaced font.

Read only

Former Member
0 Likes
1,151

hi

good

i dont think there is no such process which can help you to preseve the current font setting, and HTML behaves as per the change ot the font color and font size, but it does not change the alignment of the page,if it is changing the alignment of your page than check out if there is any box you have put in the HTML screen and the lengh of any other window that you have put in the HTML page.

thanks

mrutyun^

Read only

Former Member
0 Likes
1,151

I am trying to create a Sapscript where the numbers use a font,like in SAP, where the zero has the '.' (0) in the middle. Some of our item numbers have zeros and they are being read a the letter ‘O’.

I have tried to enter the RTF code and downloading the true type font 'Arial Mononspaced for SAP' and the zero looks the same.

Thanks!

Read only

sridhar_k1
Active Contributor
0 Likes
1,152

Loosing alignment because Courier is monospaced and arial is not, Try Changing the font to "Arial monospaced for SAP" instead of "Arial".

Regards

Sridhar

Read only

0 Likes
1,151

Hi All.

Yet another problem I am having now.

Since the output is in HTML format, if the user has set the font size to "Largest" or something else (Via IE menu path - View-> Text size-> .. ), then again everything is wrong.

Can we have an output that is NOT dependent on the user IE settings?

Thanks again.