Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. break up line length after N characters

break up line length after N characters

Scheduled Pinned Locked Moved Web Development
htmlquestionlearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Garth
    wrote on last edited by
    #1

    I have a web page where I have text files (some with HTML commands included) that are loaded into a page using FSO. I can't get the text to wrap properly when it is loaded into a table - it just keeps extending across the page, pulling the whole layout out of whack. I have no idea why this happens, as the text theoretically should just wrap within the table. What I am wondering is if anyone knows a way to go through the text file, and once say 80 characters has been exceeded, replace the next available space between words with a line break? and then keep going through all the text until each line is roughly 80 characters or so long. (I just don't want to end up cutting up any HTML commands) e.g. I wouldn't want to end up with Y>. Of course, if you had any lo-tech ideas as to fixing up the display of a text file read into a table, then that'd be just as good...

    N 1 Reply Last reply
    0
    • G Garth

      I have a web page where I have text files (some with HTML commands included) that are loaded into a page using FSO. I can't get the text to wrap properly when it is loaded into a table - it just keeps extending across the page, pulling the whole layout out of whack. I have no idea why this happens, as the text theoretically should just wrap within the table. What I am wondering is if anyone knows a way to go through the text file, and once say 80 characters has been exceeded, replace the next available space between words with a line break? and then keep going through all the text until each line is roughly 80 characters or so long. (I just don't want to end up cutting up any HTML commands) e.g. I wouldn't want to end up with Y>. Of course, if you had any lo-tech ideas as to fixing up the display of a text file read into a table, then that'd be just as good...

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      If you are using the FSO object then just append a "
      " at the end of your WriteLine method. HTH Nick Parker

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups