Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indenting text in a panel (or the panel itself)

Status
Not open for further replies.

alan6895

Programmer
Aug 3, 2007
48
US
I've been working on a simple FAQ page. It expands panels with the answers when either an image (the little plus or minus ones) or a linkbutton is a clicked. Right now, it looks like this:
<image> Question?
Answer text line 1.
Answer text line 2.

I want it to look like this:
<image> Question?
Answer text line 1.
Answer text line 2.

The answer text needs to all be indented automatically (the panel has a fixed width). I tried using a Style tag to indent the text, but that only did the first line. Is there a way to indent the entire paragraph or just the whole panel itself? The panel is nested inside a table that's centered on the page, so absolute positioning from the left of the page isn't an option, thought absolute positioning within the tablecell might be, if it exists. Thanks!
 
Use HTML of some sort.

Code:
<table>
<tr>
    <td width="50px">&nbsp;</td>
    <td>Answer text line 1.</td>
</tr>
<tr>
    <td width="50px">&nbsp;</td>
    <td>Answer text line 2.</td>
</tr>
</table>



Senior Software Developer
 
Thanks Sirius. I thought about doing that, too. That's the best I can find, so I'll just use a table. Thanks for your relpy!
 
Code:
<!-- Best Approach -->
Content
<ul style="margin: 0 0 0 20px; list-style-type: none;">
    <li>Item 1</li>
    <li>Item 2</li>
</ul>

<!-- Another Way -->
Content
<div style="margin-left: 20px;">
    Item 1<br />
    Item 2
</div>

MCP, MCTS - .NET Framework 2.0 Web Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top