467,077 Members | 942 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

Positioning a long line by a short spanned section

G'day everyone

Please tell me the following is possible using CSS positioning (it'll
make my day). I want to position a long line of text on the screen so
that a certain portion of it is in the middle of the screen. This
would be for a concordancer and we want to use HTML for the output.

I was initially thinking of doing this:

This is the <span style="position:center">house</spanthat Jack
built.

But then "This is the that Jack built." is against the left margin
and only "house" is in the centre of the screen.

What I want is that "house" is in the centre of the screen, but the
rest of the text must hug it so that it displays the entire sentence
as a normal sentence (and the user must be able to select and copy it
as a normal sentence). If the sentence is too long on the left or the
right, it can go off-screen... that's okay.

Ultimately, this method will be used to display a long list of
sentences with the same words in the middle in a different colour, so
that users can easily see the words in context to determine how they
are used.

Please note that my CSS skills are very basic.

Any replies are appreciated.

Thanks
Samuel (aka voetleuce aka leuce)
Jan 11 '08 #1
  • viewed: 1403
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Andrew Jones | last post: by
6 posts views Thread by Stephen Cook | last post: by
6 posts views Thread by I am Sam | last post: by
65 posts views Thread by kyle.tk | last post: by
15 posts views Thread by David Geering | last post: by
21 posts views Thread by Bart C | last post: by
2 posts views Thread by Slick50 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.