I am trying to place padding for the table so that it looks good. but how?


<table border="0" width="300px">
<tr style="background-color:#ede6c9; color: black;">

// How can we help

$result = mysql_query("SELECT * FROM `static_page` WHERE post_id='27'") or die(mysql_error());

echo '<td>';
while ($data = mysql_fetch_array($result)){
       $isi = $data['isi_berita'];
       echo '<h2>'.$data['judul'].'</h2><br><br>';
       echo substr($isi, 0, 1000).'<br>';


Edited by diafol: Wrong forum - AGAIN!

2 Years
Discussion Span
Last Post by raykevinnn

Do you mean padding:5px;? You can apply padding to the table, table rows, table cells, etc. You might need to explain a little more, or perhaps provide some example.


I know the code, I just do not know where to place the padding at? (so that the code shows exactly like as it suppose to be)


so that the code shows exactly like as it suppose to be

Eh? I'm not really sure what you mean by the above comment. You set the padding on the element you want padding on, there really isn't anywhere it is "supposed to be". Or are you asking if you should put it inline (like you already did with your table row), or in a stylesheet (like you really should be doing).



For the millionth time - please stop posting every single question into the PHP forum - and I've repeatedly shown/told you how/why to style with css.

Do you ever take notice of anything we tell you?

Sorry, I am feeling grumpy, but come on.

Post moved...

Edited by diafol

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.