ag3nt42 Posted July 9, 2008 Share Posted July 9, 2008 hello all, I'm sure this is an easy question but its driving me frikin nuts.. I have a included txt file.. that the owner of the site writes out whatever he wants.. Then I display that txt on the home page... My problem is the owner doesn't know html coding and can't format his own text.. and every attempt I have made at auto formatting the text is a goose chase.. It works in IE but NOT in FF.. I'm going bonkers over it. Is there a set way of doing this? I'm guessing there must be being that I'm typing into a text field right now.. And once I hit the submit button the text will look exactly as I have just typed it. Thats What I need to happen with My text. thanks for helping, Ag3nt42 Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/ Share on other sites More sharing options...
rajivgonsalves Posted July 9, 2008 Share Posted July 9, 2008 you should post your code that would help us analyze the problem Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585311 Share on other sites More sharing options...
ag3nt42 Posted July 9, 2008 Author Share Posted July 9, 2008 there really isn't any code to post... I just wana know how everyone is formatting their text for display on a webpage.. Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585313 Share on other sites More sharing options...
ag3nt42 Posted July 9, 2008 Author Share Posted July 9, 2008 php include and span wrap echo("<span class='txt'>"); include('Editable/welcome.txt'); echo("</span>"); welcome.txt: some text css: .txt { white-space:pre; } Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585317 Share on other sites More sharing options...
ag3nt42 Posted July 9, 2008 Author Share Posted July 9, 2008 here is the problem... the text either goes off the element or the spacing gets screwed up. happens radically on IE and FF fix one the other is messed up Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585319 Share on other sites More sharing options...
rajivgonsalves Posted July 9, 2008 Share Posted July 9, 2008 It could be a problem with the text formatting of the text file your should use fopen instead of include that could be a solutions. Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585327 Share on other sites More sharing options...
ag3nt42 Posted July 9, 2008 Author Share Posted July 9, 2008 welcome.txt: Welcome to CompuTrain Enterprises, Inc. CompuTrain has been designing and developing Fund Accounting Software since 1994. We are a privately held corporation located in South Bend, Indiana,just down the street from the University of Notre Dame. Our overall purpose is to provide the best possible fund accounting program, support and training on the market. CompuTrain is committed to providing our customers with the solutions they need and want. CompuTrain listens to its customers incorporating their ideas, suggestions and needs into the software solutions. The end result is a user-friendly program that will save you time and money. Please take a look over our Products to see some key advantages of our software and company. CompuTrain Enterprises, Inc. 888-477-4550 574-271-2766 FAX 775-522-3916 P.O Box 8015 South Bend, IN index.php: <?php require('header.php'); require('menu/menu.php'); echo("<div class='txt'>"); include('Editable/welcome.txt','r'); echo("</div>"); require('footer.php'); ?> compu.css: /*******************************************/ /** COMPUTRAIN ENTERPRISES INC - CSS FILE **/ /*******************************************/ /**************/ /** MAIN CSS **/ /**************/ body { margin:auto; text-align:center; background-image:url(imgs/silvercoins.png); color:white; } div.container { margin:auto; text-align:center; width:900px; height:95%; background-image:url('imgs/background.png'); } div.header { background-image:url('imgs/header.png'); background-position:bottom center; background-repeat:no-repeat; width:100%; height:163px; margin:auto; text-align:left; } img,a{border:none;} a{color:white;text-decoration:none;} /**************/ /** MENU CSS **/ /**************/ .menu { margin:auto; text-align:center; display:block; padding:0; margin:0; float:left; position:relative; left:20px; list-style-type:none; } .home a:hover { background-image:url('imgs/button1Over.png'); background-position:bottom center; width:130px; height:45px; cursor:hand; float:left; list-style-type:none; } .home { background-image:url('imgs/button1.png'); background-position:bottom center; width:130px; height:45px; cursor:hand; float:left; list-style-type:none; } .products a:hover { background-image:url('imgs/button2Over.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .products { background-image:url('imgs/button2.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .services a:hover { background-image:url('imgs/button2Over.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .services { background-image:url('imgs/button2.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .news a:hover { background-image:url('imgs/button2Over.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .news { background-image:url('imgs/button2.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .downloads a:hover { background-image:url('imgs/button2Over.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .downloads { background-image:url('imgs/button2.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .summit a:hover { background-image:url('imgs/button2Over.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .summit { background-image:url('imgs/button2.png'); background-position:bottom center; width:120px; height:45px; cursor:hand; float:left; list-style-type:none; } .contact a:hover { background-image:url('imgs/button3Over.png'); background-position:bottom center; width:130px; height:45px; cursor:hand; float:left; list-style-type:none; } .contact { background-image:url('imgs/button3.png'); background-position:bottom center; width:130px; height:45px; cursor:hand; float:left; list-style-type:none; } /**********/ /** IMGS **/ /**********/ div.logo { background-image:url('imgs/logo2.png'); background-repeat:no-repeat; width:395px; height:48px; position:relative; top:50px; left:30px; } div.img1 { background-image:url('imgs/img2.png'); width:450px; height:131px; position:relative; left:390px; top:-40px; } /*****************/ /* INDEX CONTENT */ /*****************/ .txt { white-space:pre; } /***************/ /** COPYRIGHT **/ /***************/ div.CopyRight { font-size: -1; background-image:url('imgs/backgroundcap.png'); text-align:center; margin:auto; height:27px; background-repeat:no-repeat; width:902px; } Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585343 Share on other sites More sharing options...
rajivgonsalves Posted July 9, 2008 Share Posted July 9, 2008 instead of include('Editable/welcome.txt','r'); try echo file_get_contents('Editable/welcome.txt'); Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585349 Share on other sites More sharing options...
ag3nt42 Posted July 9, 2008 Author Share Posted July 9, 2008 does the same thing css: .txt { white-space:pre; width:650px; margin:auto; text-align:left; } Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585352 Share on other sites More sharing options...
rajivgonsalves Posted July 9, 2008 Share Posted July 9, 2008 look pretty good for me, this is strange Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585361 Share on other sites More sharing options...
ag3nt42 Posted July 9, 2008 Author Share Posted July 9, 2008 what browser are you using... in IE it is not formatted at all... and in FF it floats down the page off the element Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585439 Share on other sites More sharing options...
ag3nt42 Posted July 9, 2008 Author Share Posted July 9, 2008 nvrm I got it good enough i guess Quote Link to comment https://forums.phpfreaks.com/topic/113904-solved-stupid-text/#findComment-585525 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.