Color the space between tr's

时间:2015-05-12 22:54:37

标签: html css

I'm trying to give a color to the space between the rows.
This is the result:
http://gyazo.com/88b855df698f55d1e8c7350a31f4d51b enter image description here

What I have done is the following:

public class Product implements Comparable<Product> {
    public Product(int id, int price) {

    }
}

As you can see there is still spacing between each row. Btw the table is made in php.
How can I color the space between the rows too?

2 个答案:

答案 0 :(得分:6)

Give the entire table a background color and then assign each // factories/all.php $fm->define('My\Models\Event', [ 'title' => Faker::text(75), 'contact' => 'factory|My\Models\Contact' ]); $fm->define('My\Models\Contact', [ 'first_name' => Faker::firstName(), 'email' => Faker::email(), ... etc ]); // EventControllerTest.php ... /** * @var League\FactoryMuffin\FactoryMuffin */ protected $muffin; public function setUp() { parent::setUp(); $this->muffin = new FactoryMuffin(); $this->muffin->loadFactories(base_path('tests/factories')); } ... public function testCanStoreEvent() { $event = $this->muffin->instance('Quirks\Models\Event'); echo $event->contact; // returns null $event_data = $event->toArray(); $this->call('POST', 'events', $event_data); $retrieved_event = Event::where('title', '=', $event->title)->get()->first(); $this->assertNotNull($retrieved_event); // passes $this->assertRedirectedToRoute('events.edit', $retrieved_event->id); // passes // So, the event is persisted and the controller redirects etc // BUT, related data is not persisted } the background color you want them to be.

答案 1 :(得分:1)

Set the function () { if (!isButtonClick) initialize(0, 0) }); of your cells to position and then use an absolutely positioned pseudo element.

Here's a very rough example, assuming a 5px gap between your cells:

relative