![]() |
| |||||||
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
| |||
| 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 |
| |||
| 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> |
| ||||
| 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 Did I help you out? Make me popular by clicking the icon!If you found a post helpful, please click the button in the lower right-hand corner of the post.Powered by ASP.Net |
| |||
| 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 |
| ||||
| 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. |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
| Sponsored Links |
| ASP.NET Resource Index a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer. Free Web Directory Including Chats and Forums Resources, Offer automatic, instant and free directory submissions. | URLZ Web Directory URLZ Web Directory Free Web Directory - Add Your Link The Little Web Directory | Free Web Directory Pegasus free web directory is a free directory organised by categories. Web Directory & SEO Services dirroot web directory |