Previous Entry Share Next Entry
Adcott, this is mostly aimed at you I guess
The LJ-Cut tag is all wrong, and here's why....

If you want to center it, the way to do that is as follows:
<center><lj-cut text="Cut Here"></center>

Here is the cutted text
Now, that used to be fine. Ish. Your (Cut Here) is centered. However, what if you want to close the cut? This gives us the following method:
<center><lj-cut text="Cut Here"></center>

Here is the cutted text


Here is the text after the cut
This is bad. The reason being that on a talkread view, it will look like this:
<center><a name="cut1"></center>

Here is the cutted text

Here is the text after the cut
BUT on a Journal view, it will look like this:
<center><a href=...>(Cut Here)</a>

Here is the text after the cut
You see? The Center tag is still open after the cut. I've found the only way to correctly do this would be to arrange it as follows:
<center><lj-cut text="Cut Here"></center>

Here is the cutted text


Here is the text after the cut
What this does is means that if the page is viewed on a talkread page, then it has <center></center> tags, which don't affect the actual text. And if it's viewed on a journal, the center before the cut is then closed after the cut. But this is messy, and not up to HTML standards because of nesting rules.

And yes, I know you could correctly nest it within DIVs, by doing <div center> <lj-cut> <div left> </div left> </lj-cut> </div>, but that's still messy, and nobody wants to go to that much hassle just to center some text. That's getting towards proper formatting of the page, and starts getting icky....

Just saying....

  • 1
I always thought the past participle of cut should be cat...

'Here is the cat text' etc.

I'm sure "cutted" looks wrong, there should be a past participle. Perhaps "cit"...

you've got too much time on your hands dear

(Deleted comment)
I'm glad you're as outraged as me ;o)

what if you do

cut text

i assume it'd have the same effect, but maybe the paragraph command would be more specific than a generic center command? i just wondered, but i'm actually too lazy to try for myself =P

fuck, stupid code command didn't work how i expected... should have read:

< p align="center" >< lj-cut text="cut" >< /p >
cut text
< /lj-cut >
non-cut text

I don't think so, because on a Friends view or whatever, the </p> tag will be snipped out along with the cut tag... So the non-cut text at the end will still be centered...

hmmm... what if you did

< p align="center">< lj-cut text="yaddah yaddah" >< /p >
*cut text*
< p align="center" >
< /lj-cut >< /p >
*after cut text*

that way, on friends view it will pick up the second < /p > and continue... and in talkread view it will be closing the second < p > which will appear as the last line of the cut text, and thus only appear in talkread.

That's more or less what I said in the post, only with <center> tags instead. It's still a messy way of doing something which should be simple :o)

I think this is pretty much the reason why it took so long to be introduced...

mart hate(d/s) the idea and protested vigorously ;)

I may be wrong but I think there are now safeguards against closing tags within a cut. Only way to know for sure is to test it, and I'm too damn tired :P

I can't be bothered testing it. I'll just assume that the idea is flawed, and leave it at that :o)

  • 1

Log in

No account? Create an account