View Full Version : Is it possible to pad just one cell?
juggernaut
2005-12-03, 03:57 AM
Title says the question. Code would be nice too lol. Getting the impression this is a no, on my searches. Thanks Jugg..
Wazza
2005-12-03, 04:32 AM
A rough and ready example using CSS
Wasn't working in FF...
Aaaaaaaaah fuck it!
See next...
Wazza
2005-12-03, 04:37 AM
Or if you want - just slap another table with its own cellpadding inside the cell you want this done to
Is this what you are after?
http://www.mysiteontheweb.com/
Wazza
2005-12-03, 07:23 AM
or
http://www.w3schools.com/css/tryit.asp?filename=trycss_padding
and
http://www.w3schools.com/css/css_padding.asp
That's basically what my test page shows :) (If you look at the source like the title tells you to)
ClickBuster
2005-12-03, 09:01 AM
Is that what you're asking for?
<td style="padding: 10px">Cell content</td>
http://www.yourwindow.to/information-security/gl_paddedcell.htm
http://www.yourwindow.to/information-security/gl_paddedcell.htm
|haha
I just nest a new table into the cell
Surfn
2005-12-03, 09:24 AM
I just nest a new table into the cellThat's the easiest and quickest way. Although I think is slows down the load time even more.
Although I think is slows down the load time even more.Depending on the amount of content contained in the table, it will slow down the rendering of the page considerably, especially in the Mozilla based browsers.
I have started using divs, rather than tables, to achieve the same layout
Example - www.thatmanpoker.com
Wazza
2005-12-03, 12:01 PM
That's basically what my test page shows :) (If you look at the source like the title tells you to)
Easy tiger - I wasn't trying to trump you - the example you posted did not merge the css into a single cmd whereas mine did... which is why I posted it ;)
juggernaut
2005-12-03, 02:27 PM
All very good examples and yes they will help me get what I need today for sure. Basiclly if you go to my site you will see after you enter the index, my header has a banner for PECash and I put some text at the top of it. But the banner is right justified and that just makes the text look like it runs off the page. I just wanted to put some distance from the edge. When I try this it applys it to the whole table. I was going to nest a new table but that just seems to screw up the whole header. Thank you I will let you know how it goes...
As your banner cell is right aligned, the position of the banner will stay the same. If all banners are 468 pixels wide you can use a div to center the text above it:
<div style="width:468px;text-align:center;">
Your text centered under/over banner
</div>
So the code for the banner cell on your page(s) will be
<td width="59%" align="right" valign="top" bgcolor="#ffffff" class="topheader">
<div style="width:468px;text-align:center;color:#ff0000;font-size:10px">
BUY YOUR FAVORITE HOST A GIFT HERE!!
</div>
<script src="bannerdisplay/showbanner.php?catid="></script>
</td>
Hope that helps
Steve
juggernaut
2005-12-03, 03:41 PM
As your banner cell is right aligned, the position of the banner will stay the same. If all banners are 468 pixels wide you can use a div to center the text above it:
<div style="width:468px;text-align:center;">
Your text centered under/over banner
</div>
So the code for the banner cell on your page(s) will be
<td width="59%" align="right" valign="top" bgcolor="#ffffff" class="topheader">
<div style="width:468px;text-align:center;color:#ff0000;font-size:10px">
BUY YOUR FAVORITE HOST A GIFT HERE!!
</div>
<script src="bannerdisplay/showbanner.php?catid="></script>
</td>
Hope that helps
SteveFirst code worked just fine, thanks so much. I was dreading this today as I ended up getting side tracked and figured I would not get to this till later tonight. I can't say thanks enough.. |bow|
NP... glad to help :)
One thing, tho; Take out the closing div after your banner call... it is no longer required.
vBulletin® v3.8.1, Copyright ©2000-2026, Jelsoft Enterprises Ltd.