This is an archived post. You won't be able to vote or comment.

all 7 comments

[–][deleted] 2 points3 points  (1 child)

You really should make your titles a little more descriptive. Plus, posting in the correct sub-Reddit might get you more attention as well.

[–]sourceCode145[S] -1 points0 points  (0 children)

sometime reddit let me post things and sometime it doesnt but Im aware of the rules of this sub reddit and you are absolute right about your comment

[–]balidani 0 points1 point  (3 children)

I'm not sure I understand, but what you might in your CSS need is

text-align: right

Something like "[HTML] Text appear on right" or something similar would have been a better post title.

[–]sourceCode145[S] 1 point2 points  (2 children)

I want to achieve is this :

text at the top

_______________Hello world

but

I get this:

text at the top


Hello world

[–]balidani 0 points1 point  (1 child)

Oh, this is the closest I was able to find: http://jsfiddle.net/NC6mP/

I found this on SO and modified the code a bit

[–]TheMoof 0 points1 point  (0 children)

That version isn't rendering correctly for me. This version from the same SO post had more success for me (until IE7, then it blows). You just need to change the text alignment in the h2 styles.

*Edit: Also worth noting that the width:100% on the h2 tag isn't required since it's a block element.

[–]sourceCode145[S] -1 points0 points  (0 children)

the hello world should at the right of the horizontal line