![]() |
| |||||||
| Sponsored Links |
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Hi, I have a table cell that i am having problems with I have a image which is 300 px wide and i want some text to be centered in reference to the image. Also the image has to be centered with the table cell here is my code Code: .nametd
{
width:381.73px;
text-align:left;
height:287.244px;
padding-left:12px;
border-left:white dashed 1px;
border-bottom:white dashed 1px;
border-collapse: collapse;
}
<table>
<tr>
<td class="nametd"><br/><br/><br/>
<img src="/images.one.jpg" width="300px" style="align:left; "><br/>
<span style="font-size:40pt;">Joe</span><br/>
<span style="font-size:40pt;">Doe</span><br/>
<span style="font-size:20pt;">CEO</span><br/>
<span style="font-size:21pt;">Company</span></td>
</tr>
</table>
todd |
| Sponsored Links |
|
#2
| |||
| |||
| I tried it like this Code: .imglineup
{
text-align:center;
width:300px;
display:block;
}
.nametd
{
width:381.73px;
text-align:center;
height:287.244px;
border-left:white dashed 1px;
border-bottom:white dashed 1px;
border-collapse: collapse;
}
Code: <table> <tr> <td class="nametd"><br/><br/><br/> <img src="/images.one.jpg" class="imglineup"><br/> <span style="font-size:40pt;">Joe</span><br/> <span style="font-size:40pt;">Doe</span><br/> <span style="font-size:20pt;">CEO</span><br/> <span style="font-size:21pt;">Company</span></td> </tr> </table> |
|
#3
| |||
| |||
| doesnt work I need to center the image first with reference to the table cell and then the name should be centered with reference to the image |
|
#4
| ||||
| ||||
| Can you provide a link to the page, or, using something like MS Paint, could you draw a picture of how it shoud look?
__________________ jmurrayhead If you agree with me... click the icon! If my post solved your problem, click the button in the lower right-hand corner of the post.If you like it here...throw us a few bones to help support us. Join our Folding team: DeveloperBarn Folding |
|
#5
| |||
| |||
| Hi, I am attaching an image how it should look like The outside rectangle is the table cell then the image is aligned center with reference to the table cell then the text is aligned center in reference to the image thanks for all your help todd |
|
#6
| ||||
| ||||
| Unless I'm misunderstanding your question, just style the <td> with text-align:center; I don't understand what you're trying to accomplish with all the other styling, particularly using text-align:left; And why would you need to style the height and width of the <td>? If you need space around the image, you can use padding:10px; or whatever. |
|
#7
| |||
| |||
| anyone with any ideas |
|
#8
| ||||
| ||||
| i see what you want it to look like....but what does it look like with the code you posted? |
|
#9
| ||||
| ||||
| Why are you using tables? Use divs and css styling.
__________________ "You'll never be as perfect as BLaaaaaaaaarche." |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|