首页 > 解决方案 > Html display tables weirdly

问题描述

Since yesterday, i'm having a weird issue with my Flask projects. I'm following a tutorial and it's supposed to look like this: enter image description here

But it looks like this: enter image description here

I've been looking for an answer since yesterday... any advice ?

Here is the code: I have a base.html file:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {%block head%}{%endblock%}
  <link rel="stylesheet" href="{{ url_for( 'static', filename='css/main.css')}}"
</head> 
<body>
    {%block body%} {%endblock%}
</body>
</html>

and a index.html that contains the table:

{%extends 'base.html'%}

{%block head%}

{%endblock%}



{%block body%}
<div class="content">
    <h1>Task Master</h1>

<table>
    <tr>
        <th>Task</th>
        <th>Added</th>
        <th>Actions</th>
    </tr>
    <tr>

        <td></td>
        <td></td>
        <td>
            <a href="">Delete</a>
            <br>
            <a href="">Update</a>
        </td>
    </tr>
</table>
</div>
{%endblock%}

THANKS SO MUCH !

标签: htmlcssflask

解决方案


推荐阅读