Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Location
    Back in Toronto
    Posts
    19
    Plugin Contributions
    0

    Default Styling PhP output

    I have spent many days / hours trying to implement "css style" on certain php output text, with no success.

    Today is a better day as I finally figured it out.

    Anyways I decided to post the working code for all the uninformed "such as myself" a long with a few links to various php urls dealing with using echo to implement a css style.

    1)This is a post on the various ways to use echo. Nice reference. http://php.net/manual/en/function.echo.php.

    2)This is a post on using the <link Rel> or echo <link Rel> to import css. This must be very basic know how,because after looking at tons of sites and post it was the only one which mention the type of header. http://archives.hwg.org/hwg-techniqu...assistance.com.

    3)BB thread over at our friends at dynamicdrive.com offers further reference and example using echo to wrap php code. oohps to wrap the output of php code. http://www.dynamicdrive.com/forums/a...hp/t-4879.html.

    Here is a working example of using echo and the span class to style your php output. In fact if you look through your php files one will find this technique has already been used but to the informed "such as myself" it was missed.

    define('TEXT_CHOOSE_SHIPPING_DESTINATION','<span class="ship">Your order will be shipped to the address at the left or you may change the shipping address by clicking the Change Address button.</span><br/>');

    You have to include your new css class in the main css file. I am using / changing the Cold_Steel templet by Clyde Jones and this templet has a main css file in the Customs\Css dir so your situation may differ.

    I hope this reference is useful to you.

    Cheers

  2. #2
    Join Date
    Apr 2009
    Location
    Back in Toronto
    Posts
    19
    Plugin Contributions
    0

    Default Re: Styling PhP output

    Sorry for not providing a example for the styling php output.

    On my shipping page the address to ship to was in the same calss as the message and I wanted to change the font size and color of the message but was unable to do so with out changing the address..

    The text for the message is located in shipping.php so a new class had to be added to the main style sheet "in my case" and the (echo <span class>) was used with the added class to style the message text.

    cheers - O if you get a blank page then you "most likely added or left out syntax so be sure to save your working file in the custom folder before editing.

 

 

Similar Threads

  1. v154 Php open_basedir restrictions & PHP output buffering (gzip) off
    By bearlymakinit in forum Installing on a Windows Server
    Replies: 0
    Last Post: 5 May 2015, 08:41 PM
  2. PHP Output Buffering (gzip) = OFF
    By mumut49 in forum Installing on a Mac Server
    Replies: 1
    Last Post: 1 Apr 2010, 04:07 AM
  3. Replies: 1
    Last Post: 30 Oct 2009, 05:46 PM
  4. PHP Warning and Output 
    By bigjon1982 in forum General Questions
    Replies: 4
    Last Post: 5 Aug 2009, 06:41 AM
  5. PHP output buffering?
    By trillian in forum General Questions
    Replies: 4
    Last Post: 3 Sep 2007, 10:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg