SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    toronto
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    BBCode and CSS Formatting

    I want to store the content of a web site in the database, so I am using BBCode for the links, images, etc.

    I need the following result:

    <img class="blockcenter" src = "elements/Canadian_Flag.jpg" alt="Canadian_Flag.jpg" >
    /* CSS centers the image */

    from the BBCode:

    [img]class="blockcenter" src = "elements/Canadian_Flag.jpg" alt="Canadian_Flag.jpg"[/img]

    I get:

    <img src=" class="blockcenter" photos/atackadstargetyoy.jpg" alt="Canadian_Flag.jpg" />

    So you see how it is mangled.

    I am not sure if there is a solution in the PHP, I suspect it is in using something different for my CSS to center images. But it is close to midnight in Toronto and I am tired I hope it is a quick spot and someone can get me going again.

    Thanks
    Stephen
    Last edited by ralph.m; Apr 16, 2013 at 21:26.
    Stephen


Bookmarks

Posting Permissions

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