Jump to content

Creating New Cache - Description text doesn't wrap


Wes_and_Miles

Recommended Posts

I have created a cache page (puzzle) that has a large amount of random looking text. When I look at the (unpublished) cache page the text doesn't wrap but just goes off to the right off the page.

 

Any idea how to fix this? Probably need to add some html that I don't know. I'm sure I've seen descriptions like this before but can't think of a specific example.

Link to comment

The text should wrap, unless you've done something to prevent it from wrapping.

 

Have you used the PRE element to enter really long preformatted lines, like this?

 

<pre>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</pre>

Link to comment

The text should wrap, unless you've done something to prevent it from wrapping.

 

Have you used the PRE element to enter really long preformatted lines, like this?

 

<pre>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</pre>

Thanks, we hadn't purposely added any html (including pre). I wasn't sure what you were asking unless it was did I accidentally add pre? We tried adding pre but no change as we assume that would prohibit it from wrapping.

 

Any chance this is an artifact from viewing the cache in an unpublished state?

 

I should note, the very large string of text has no natural spaces.

 

Not relevant but I am helping my son create a cache for his geocaching merit badge.

Link to comment

There are no spaces in your text, and that's what's causing the problem with the text not wrapping.

 

Thanks, I was guessing that was the problem but am surprised it doesn't automatically wrap in order to keep it within the description window.

 

Are there any html tags or other techniques to make it automatically wrap so the text stays within the description window? Or a way to tell it to wrap after every n characters? I realize it would probably work to put in a bunch of <p> but it it big enough that I would need help writing a script just to do that.

Link to comment

Bear in mind that your cache description will be viewed on many different browsers, on computers, tablets and smartphones. The description will also be downloaded by anyone who sends caches to a dedicated GPS unit.

 

Is your son good with HTML? It's his merit badge, not yours.

 

Understand that. That is why I'm surprised text isn't automatically formatted so it displays properly on the users screen.

 

My son doesn't know html either and asked if I had any ideas. I told him I could try posting in this forum. I was hoping it would be a friendly place. :rolleyes:

Link to comment

the solution is fairly simple and does not require html.

 

Go to the edit form, and insert a space at the end of the first line. You'll have to shift a letter down to the next line, then insert a space at the end of the second line, you'll need to shift 2 letters down to the 3rd line and insert a space at the end of it etc.

 

This will go fairly fast once you get the hang of it.

 

Do a just a couple of lines, save and take a look at it.

Edited by palmetto
Link to comment

the solution is fairly simple and does not require html.

 

Go to the edit form, and insert a space at the end of the first line. You'll have to shift a letter down to the next line, then insert a space at the end of the second line, you'll need to shift 2 letters down to the 3rd line and insert a space at the end of it etc.

 

This will go fairly fast once you get the hang of it.

 

Do a just a couple of lines, save and take a look at it.

Hi Palmetto, thanks for your helpful response.

 

My son tried your suggestion. He also tried simply adding a return after each line in the edit window. Both display nicely but when you copy the text and put it into the "decoder", which the puzzle solver will need to do, it doesn't work. Inserting the extra characters are breaking the puzzle.

 

He did come up with a solution. He put the text onto a website called "pastebin.com". It wraps cleanly there (just like in the new cache edit page). He can link to it from the cache page but it would be a lot cleaner just to get it into the cache page directly. If anyone else has suggestions please let us know.

Link to comment

Understand that. That is why I'm surprised text isn't automatically formatted so it displays properly on the users screen.

It is properly formatted. By not putting in any spaces, you told the formatter that it shouldn't be split up even at the expense of running off the edge of the visible page.

 

If anyone else has suggestions please let us know.

The obvious advice is "don't worry about it". What difference does it make whether it dangles past the right margin as long as they can solve the puzzle?

 

Another possibility is to break it into lines and leave it as part of the puzzle that you have to remove the line breaks to get it to decode properly. You can leave it to them to figure out on their own, or you can explicitly tell them they need to do that. Or anything in between.

 

And there's nothing wrong with what he's done: putting the data somewhere else where formatting isn't an issue.

Link to comment

I think this will work in most modern browsers. It might still look odd on a mobile device.

 


<div style="width:200px; word-break: break-all; ">
Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua.Utenimadminimveniam,quisnostrudexercitationullamcolaborisnisiutaliquipexeacommodoconsequat.Duisauteiruredolorinreprehenderitinvoluptatevelitessecillumdoloreeufugiatnullapariatur.
</div>

Link to comment

I think this will work in most modern browsers. It might still look odd on a mobile device.

 


<div style="width:200px; word-break: break-all; ">
Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua.Utenimadminimveniam,quisnostrudexercitationullamcolaborisnisiutaliquipexeacommodoconsequat.Duisauteiruredolorinreprehenderitinvoluptatevelitessecillumdoloreeufugiatnullapariatur.
</div>

Thank You NYPaddleCacher, my son reports your suggestion solves the problem!!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...