Colour in a Table
-
I am using this html for getting a cream colour in the box paras.
Now would anyone please tell me how to get the same effect in a Table in my Page ‘When & Where’ ?
Thanks!The blog I need help with is: (visible only to logged in users)
-
Table with 2 columns and 2 rows, cream background
(set width to whatever number you want)<table border="0" width="375" align="center" bgcolor="#ffffcc"> <tbody> <tr> <td>TEXT</td> <td>TEXT</td> </tr> <tr> <td>TEXT</td> <td>TEXT</td> </tr> </tbody></table> -
It’s not clear to me what “the same effect” would be in this case. Try the following two suggestions and let me know which one is close to what you’re looking for.
A.
Change this
<table border="1" cellspacing="0" cellpadding="0">
to this:
<table style="background-color:#ffffcc;" border="1" cellspacing="0" cellpadding="0">B.
Change this
<h2 style="text-align:center;">September 2009</h2> <table border="1" cellspacing="0" cellpadding="0">to this:
<div style="font-size:16px;background-color:#ffffcc;padding:5px 5px 5px 10px;"> <h2 style="text-align:center;">September 2009</h2> <table width="100%" border="1" cellspacing="0" cellpadding="0">plus a closing div tag at the very end of the post.
PS To change font size, it’s better to use percentages or em units, not px.
-
@1tess
Appears to me a little complicated. Nevertheless, Thanks for the suggestion.
@panaghiotisadam
By “the same effect” I mean that how the first para of the blockquote in my latest post appears, I wanted exactly to get the same pattern. Yes, your kind suggestion ‘A’ has satisfied me. Now my Table looks what I wanted it to look like. Indeed thanks to you! -
You’re welcome. (But, to be fair, Tess’ suggestion was practically identical to my “A”.)
-
Must be, when you say that. But I have no knowledge to judge that. I know from reading of the many solutions in this Forum, that both of you are experts in this ‘code’ field.
Since I am unaware of the intricacies of html, I am rather hesitant to do certain changes on my own. I am conversant with the ‘copy-paste’ method and your suggestion well suited me.
- The topic ‘Colour in a Table’ is closed to new replies.