SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,178
    Mentioned
    63 Post(s)
    Tagged
    2 Thread(s)

    Another way to display answer?

    Currently I am using <p id="answer"></p> to display the contents of my answer. Is there another way to display it/call it without using <p>? Reason i am asking is because I wish to put a header, a;long with a paragraph tag inside a span in the answer. If I call the answer using this tag it messes everything up.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,044
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    p tag

    Browsers add spacing around p tags. But I wouldn't put a p tag inside a span either.
    Can you use a div and use CSS to style it?

  3. #3
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,178
    Mentioned
    63 Post(s)
    Tagged
    2 Thread(s)
    Code JavaScript:
    <script>
    if(tG>=1.2&&tG<2.7){iR='<span><h1>Private<h1><h2>Description:</h2><p>Here is the description</p></span>';}
    </script>
    That is obviously not the full code, but its what you need to know to understand it. You can see I have multiple types of writing in there. Also, my <p> already have styles to them, so they wind up interfering with any new styles I put down on the span. So. My problem would be solved if it were possible to call the answer without using a <p> tag. Any ideas? Workarounds?

  4. #4
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,178
    Mentioned
    63 Post(s)
    Tagged
    2 Thread(s)
    ugh. I just put in a span and it worked.
    Code:
    <span id="answer"></span>


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
  •