Doubt about how to add a border to this line

Asked

Viewed 32 times

1

Talk good guys I’m a few hours and could not add the border tag on this line anyone could help me?

<tr  style="font-size: 12px;text-align: center" onclick="window.location = \''.$LINK.'/show/' . $auctionInfo['id'] . '\'"><td><div id="timer_' . $auctionInfo['id'] . '">' . time_left($auctionInfo['finish_time'] - time()) . '</div></td><td>' . $auctionChar->getLevel() . ' ' . getVocationName($auctionChar->getVocation(), $auctionChar->getPromotion()) . '</td><td>' . $auctionInfo['buy_now'] . ' pp</td><td>' . $auctionInfo['bid'] . ' pp</td></tr>';

in case you need the whole page just say that I post I’m trying to add the border tag to get a little more organized and separate but it doesn’t matter how I put or where it doesn’t change if someone can give a strength

Page print

inserir a descrição da imagem aqui

  • Cara explains better what you need. You want to put edge on the table or put a margin between the fields?

  • I want to put the edge on the table ... because there at that time etc... it is possible to click and will be redirected to another tab so I need you to stay with separate edge understand?

  • Tag <table> that is out of its <tr> puts it like this <table border="1px" style=" border-collapse: collapse;">

  • thank you very much Hugo xD

  • Did it work out there? Can I add as a response?

  • can yes thank you

  • Thanks Brunds I already answered there, if you can accept I thank, so we keep the site organized with the questions that is already solved with an answer accepted.

Show 2 more comments

2 answers

0

table {
    border-collapse: collapse; 
}

td {
    padding: 10px 0;     /* 10px top & bottom padding, 0px left & right */
    border-width: 1px 0; /*  1px top & bottom border,  0px left & right */
    border-color: #000;
    border-style: solid;
}
  • Alex, explain in your code. Mainly because the user is using the style inline.

  • opa then how I would use this code and a php I would put it in some specific part?

  • I only put the part of the css that you would use, this way it is there, if you reference the css , or even put it in the body of your html <style></style> any table that you create and their respective td (column) will take and draw the lines that you wanted.

0


As stated in the comment, in the tag <table> that is out of its <tr> puts it like this <table border="1px" style=" border-collapse: collapse;">

Here’s how it looks in the example, note that all content is now separated by borders. You can still use one padding in <td> if you want to distance the contents from the edges.

<table border="1px" style=" border-collapse: collapse;">
    <tr style="font-size: 12px;text-align: center" onclick="window.location = \''.$LINK.'/show/' . $auctionInfo['id'] . '\'">
        <td>
            <div id="timer_' . $auctionInfo['id'] . '">' . time_left($auctionInfo['finish_time'] - time()) . '</div>
        </td>
        <td>' . $auctionChar->getLevel() . ' ' . getVocationName($auctionChar->getVocation(), $auctionChar->getPromotion()) . '</td>
        <td>' . $auctionInfo['buy_now'] . ' pp</td>
        <td>' . $auctionInfo['bid'] . ' pp</td>
    </tr>';
</table>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.