Unstoppable Domains

<div> CSS help

Spaceship Spaceship
Watch

Unknown

Established Member
Impact
3
I have a div inside a <td> whose width I want to be as long as the text inside it. I tried making the position: absolute, but then the text in the <tr><td> below it would overlap with the <div> text. Here is the css for the div:

.Info
{
font-size: 10px;
text-align: left;
border-bottom: solid 1px #888888;
text-indent: 10px;
}
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Can you post the HTML code?
 
0
•••
Code:
<table>
<tr>
<td>
        </td>
        </tr>
        <tr>
        <td colspan="2">
        <div class="Info">
This Div is giving me problems
</div>
</td>
</tr>
</table>

.Info
{
font-size: 10px;
text-align: left;
border-bottom: solid 1px #888888;
text-indent: 10px;
}
 
0
•••
why do you need the table at all? more details might help as i don't quite understand the issue and what you're trying to accomplish... don't you just need to take out the text-indent or something?... :blink:
 
0
•••
I took out some text to make it easier to read.

What i'm trying to accomplish is an underline of all the text inside this div. The text is small font/italicized and wont' take much space as opposed to the cell the div is in. The table cell will be about 500px wide due to other text inside of it. I want the info text to have an underline of only the text and not the whole span of the cell.

I put the indent on purpose, i want space in the beginning, but none at the end.
 
0
•••
couldn't you just use <u></u>?
 
0
•••
.... yeah, thanks for reminding me that exists :P

Gonna use span instead though, more options with that.

thanks for the help lol, i def over thought what i wanted to accomplish
 
0
•••
no problem. sometimes you just need to sit back and look at it again... or get fresh eyes on it. :blink:
 
0
•••
yea, use a span, and then text-decoration: underline.
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back