Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: How to use HTML code when post a new article  (Read 4045 times)

nthkmf

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
    • Suamaytainha
How to use HTML code when post a new article
« on: March 07, 2009, 07:07:21 AM »

Hj everybody! May be this post's not on a right room,please forgive me and sorry for my English :)

I had a problem when used code in my new article. it did not work. Example,

Code: [Select]
<p align=right>Test</p>
and this text will appear at the right side. But in my post, it did not work.
Thanks for your consideration.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: How to use HTML code when post a new article
« Reply #1 on: March 08, 2009, 05:54:04 PM »

When using HTML tags, you need to have quote marks on both sides of the value within the tag.
Examples:
<p align="right">This makes text flush-right.</p>
<p align="left">This makes text flush-left.</p>
<p align="centre">This makes text centered.</p>
<p align="justify">This makes text flush both sides.</p>
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

nthkmf

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
    • Suamaytainha
Re: How to use HTML code when post a new article
« Reply #2 on: March 10, 2009, 06:40:05 AM »

Thanks for your consideration.
But, it still doesn't work. I don't know why. And When I try another code, example
Code: [Select]
<p style="text-align: right;">Text</p>It's work!  I tested my site with IE, Chrome and firefox.
Is there any problem?  ::)
Logged

Joost

  • Guest
Re: How to use HTML code when post a new article
« Reply #3 on: March 10, 2009, 03:22:15 PM »

Thanks for your consideration.
But, it still doesn't work. I don't know why. And When I try another code, example
Code: [Select]
<p style="text-align: right;">Text</p>It's work!  I tested my site with IE, Chrome and firefox.
Is there any problem?  ::)

Welcome nthkmf,

Code: [Select]
<p align=right>Test</p>.. is an old style and hardly used these days. So it is probably not supported by many modern browsers

The preferred way is indeed
Code: [Select]
<p style="text-align: right;">Text</p>This is called css (Cascading Style Sheets). Instead of inline styling you van choose to put the style in a separate file, a stylesheet.
Such stylesheet is style.css, which comes with each snews package.
The advantage is, that you don't have to style each element (div, h2, p) individually.



Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: How to use HTML code when post a new article
« Reply #4 on: March 21, 2009, 05:05:55 PM »


Code: [Select]
<p align=right>Test</p>.. is an old style and hardly used these days. So it is probably not supported by many modern browsers

The preferred way is indeed
Code: [Select]
<p style="text-align: right;">Text</p>This is called css.

It may be an 'old' way but it's still working in IE7 and current FF versions... though it is better declaring the styles in the css stylesheet.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Joost

  • Guest
Re: How to use HTML code when post a new article
« Reply #5 on: March 21, 2009, 05:36:41 PM »

It may be an 'old' way but it's still working in IE7 and current FF versions...

Obviously nthkmf did encounter issues, otherwise he wouldn't have posted his questions.
Keeping code close to its standards decreases the change on unexpected behaviour.
Logged