plainblack.com
Username Password
search
Bookmark and Share

    

Q&A CS Formatting.

User eleger81
Date 11/26/2007 1:42 pm
Views 1817
Rating 5    Rate [
|
]
Previous · Next
User Message
eleger81

Does anyone else run into a formatting problem if they try and create a Q&A CS?  For instance, if you use IE 7.x and create an answer to a question that has a paragraph/ul/paragraph, the answer ends up displaying outside of its "bounding" box (the gray border).

Anyone know how to fix this?  I'd appreciate any help!  :)

p.s.  Here's a link to what I'm talking about on a demo page (default login): http://demo.plainblack.com/demo1196106241_590/home

--- (Edited on 11/26/2007 1:42 pm [GMT-0600] by eleger81) ---



Back to Top
Rate [
|
]
 
 
eleger81

I figured out what was happening.  The box was associated with the "p class=posts".  It was putting the border around the entire Q & A (assuming that it was all in one paragraph tag), but if your answer had more than one paragraph, or UL or OL, it was breaking the border just before those items.

What I did was this:

  • In the Q & A Template, remove the "class='posts'" from the paragraph tag around the question and answer area.
  • Wrap the entire Q & A area with a "div" tag, and associate it with the "posts" CSS setting.

The code for that general area in the template should look like this instead (I also gave the "A:" a strong attribute):

<div class="posts">
 <p>
  <b>Q: <tmpl_var title></b>
  <strong>A:</strong> <tmpl_var content>
 </p>
</div>
 <p />

Hope this is helpful for someone else as well.  Cool

--- (Edited on 11/29/2007 8:19 am [GMT-0600] by eleger81) ---



Back to Top
Rate [
|
]
 
 
preaction

This would still cause problems with invalid markup (<p> cannot contain other <p>).

A more correct solution would be:

<dl>
<dt>Q: <tmpl_var title></dt>
<dd>A: <tmpl_var content></dd>

<dt>Q: <tmpl_var title></dt>
<dd>A: <tmpl_var content></dd>

...

</dl>

And then apply the correct stying to above. 

--- (Edited on 11/29/2007 4:05 pm [GMT-0600] by preaction) ---



Back to Top
Rate [
|
]
 
 
eleger81
Thank you very much!  I like that idea better.  It also adds the indent to the answer (because it's considered a definition), which looks nice.  Thanks again!

--- (Edited on 11/30/2007 8:31 am [GMT-0500] by eleger81) ---



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved