Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 相邻的两张桌子_Php_Html_Css_Laravel - Fatal编程技术网

Php 相邻的两张桌子

Php 相邻的两张桌子,php,html,css,laravel,Php,Html,Css,Laravel,所以我有这个问题。 我需要把第二张桌子放在第一张桌子旁边(右边)。或者更喜欢把它像10px放在它旁边,但是把表的顶部放在同一个“y”px上;我也不希望表格是实心的,因为表格在for()中,应该有更多的表格,然后只有两个(现在是1+1,然后是1+1,在它下面是另一个1+1表格),现在第二个表格在第一个表格下面。 我尝试了几件事,但仍然找不出正确的答案。我不是css大师,我只是在学习。有人能帮忙吗 <div style="width: 400px"> @foreach ($r

所以我有这个问题。 我需要把第二张桌子放在第一张桌子旁边(右边)。或者更喜欢把它像10px放在它旁边,但是把表的顶部放在同一个“y”px上;我也不希望表格是实心的,因为表格在for()中,应该有更多的表格,然后只有两个(现在是1+1,然后是1+1,在它下面是另一个1+1表格),现在第二个表格在第一个表格下面。 我尝试了几件事,但仍然找不出正确的答案。我不是css大师,我只是在学习。有人能帮忙吗

    <div style="width: 400px">
  @foreach ($reminders as $reminder)

<table style="margin-left: 550px; width: 100%; position: center; margin-top: 50px;">
    <tr style="">
      <th colspan="4">{{$reminder->title}}</th>
    </tr>
    <tr> 
     <th colspan="4" style="height: 150px; text-align: left">{{$reminder->text}}</th></tr>
     <tr> 
      <th>
        <form method="post" action="/donereminder" >
              @csrf

        <input type="hidden" name="rem" value="{{$reminder->id}}" readonly style="width: 0%">
        <button type="submit" style="width: 100%">Done</button>
      </form></a></th>
      <th><button class="button" style="width: 100%">Report</button></th>
      <th><a href="/reminders/{{$reminder->id}}/edit"><button class="button" style="width: 100%">Edit</button></a></th>
      <th>
      <form method="POST" action="/reminders/{{ $reminder->id}}">
    @method('DELETE')
    @csrf

    <div class="field">
    <div class="control">
      <button type="submit" class="button" style="width: 100%;">&#128465; </button>
    </div>
  </div>
  </form>
</th></tr>
    </table>

<table style="margin-left: 550px; width: 100%; position: center; margin-top: 50px">
<form method="POST" action="/reminders/{{$reminder->id}}">

  @method('PATCH')
    @csrf

      <tr>
        <th>
          <div class="form-group">
          <label>Name</label>
          <input type="text" class="form-control" name="title" placeholder="Name of reminder" value="{{$reminder->title}}">
        </div>
      </th>
      </tr>
      <tr>
        <th>
          <div class="form-group">
          <label>Text</label>
          <input type="text" class="form-control" name="text" placeholder="Description of your reminder"  value="{{$reminder->text}}">
        </div>
        </th>
      </tr>
      <tr>
        <th> <div class="form-group">
          <label>Typ</label>
          <select class="form-control" name="typ"  value="{{$reminder->typ}}">
            <option name="typ" value="0">Práce</option>
            <option name="typ" value="1">Narozeniny</option>
            <option name="typ" value="2">Sport</option>
            <option name="typ" value="3">Jiné</option>\
          </select>
        </div></th>
      </tr>
      <tr>
        <th> <div class="form-group">
          <label>Priorita</label>
          <select class="form-control" name="priority"  value="{{$reminder->priority}}">
            <option name="priority" value="{{$reminder->priority}}">{{$reminder->priority}}</option>
            <option name="priority" value="10">10</option>
            <option name="priority" value="9">9</option>
            <option name="priority" value="8">8</option>
            <option name="priority" value="7">7</option>
            <option name="priority" value="6">6</option>
            <option name="priority" value="5">5</option>
            <option name="priority" value="4">4</option>
            <option name="priority" value="3">3</option>
            <option name="priority" value="2">2</option>
            <option name="priority" value="1">1</option>
          </select>
        </div></th>
      </tr>
      <tr>
        <th>
           <div class="form-group">
          <label>Done time</label>
          <input class="datepicker" data-date-format="mm/dd/yyyy"  type="date" placeholder="MM/DD/YYYY" name="donetime"  value="{{$reminder->donetime}}">
        </div>
        </th>
      </tr>
      <tr>
        <th>
          <div class="field">
    <div class="control">
      <button type="submit" class="button is-link"  style="width: 25%;">Upravit reminder</button>
    </div>

  </div>
        </th>
      </tr>
    </table>
    </form>

@foreach($提醒作为$提醒)
{{$提醒->标题}
{{$提醒->文本}
@csrf
多恩
报告
@方法('DELETE')
@csrf
🗑 
@方法('补丁')
@csrf
名称
正文
类型
普拉斯
纳罗齐尼
运动
金奈\
优先权
{{$提醒->优先级}
10
9
8.
7.
6.
5.
4.
3.
2.
1.
完成时间
上行提醒

有很多方法可以做到这一点。我建议你举个例子

考虑事项:
  • 在子元素中使用
    display:inline block
    。这样,所有元素都将位于同一条“水平线”
  • 默认情况下,
    vertical align
    设置为基线。因此,设置
    vertical align:top
    以避免这种情况
  • 适合的表的数量取决于它们的
    宽度
    及其父表的
    宽度
  • 您可以在每个表上调整
    右边距
    ,以确定它们之间的距离

注意我删除了您的
php
代码,并将
background
添加到表中 由于要正确显示结果



{{$提醒->标题}
{{$提醒->文本}
@csrf
多恩
报告
🗑 
名称
正文
类型
普拉斯
纳罗齐尼
运动
金奈\
优先权
{{$提醒->优先级}
10
9
8.
7.
6.
5.
4.
3.
2.
1.
完成时间
上行提醒
您的容器
具有
宽度:400px
,子表具有
宽度:100%
。每个表的宽度都是400px,因此这种方式不符合您的目的。