Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Feb 2007
    Posts
    113
    Thanks
    6
    Thanked 1 Time in 1 Post

    CSS to show submited data as list.

    I have a table that shows data with bullet infront of each list. But when I display it is doesn't show as a list... It shows like this:

    • AC • Water

    Is there anyway to use CSS to make it show like this?:

    • AC
    • Water

    It would simply have to put a <BR> before each •

  • #2
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    Okay, little bit confused as to what you tried to make it appear inline as a list element will display as a block by default. Have you used:

    Code:
    <ul>
    	<li>AC</li>
    	<li>Water</li>
    </ul>
    Can you show us an example, or link to your page? If you have used a list and it's displaying like that then you could try adding to the CSS:

    Code:
    li {
    	display: block;
    }
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #3
    Regular Coder
    Join Date
    Feb 2007
    Posts
    113
    Thanks
    6
    Thanked 1 Time in 1 Post
    Well that would work for static data. The problem is the text I am trying to list is dynamic, users submit. I have a form where users can enter data using this: http://www.freewebs.com/moreauctions/addtext.html

    After they submit the form, I can later print/echo the text using $showcontent which is the variable for the textarea.

    Now have to somehow get the value of $showcontent, then put a <br> BEFORE each bullet before printing it.

    I'm doubting thing that CSS can do this now. I think this would be javascript but I'm not sure.

  • #4
    Regular Coder BWiz's Avatar
    Join Date
    Mar 2006
    Location
    Sol System
    Posts
    471
    Thanks
    7
    Thanked 21 Times in 21 Posts
    That would be down to you're PHP coding. I would use a loop.
    BWiz :: Happy Coding!
    2006
    2007 2008 2009
    2010 2011
    Irrational numbers make no sense.


  •  

    Posting Permissions

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