Design page layout using CSS/Div like HTML table

前端 未结 3 1145
无人共我
无人共我 2021-01-13 14:26

Since i am new to CSS, i am not sure if the following page layout is possible using Div/CSS or shall i use HTML table?.

i want to design my page such that, Left sid

3条回答
  •  没有蜡笔的小新
    2021-01-13 14:31

    You don't need to use

    for the layout you described (and you won't need anything CSS3 or HTML5 specific).

    There are a few options for implementing this layout. Here's a good tutorial on CSS layout:

    • CSS Layouts

    Here is one example of your layout:

    • jsFiddle

    HTML

    Left Side Row 1
    Left Side Row 2
    Left Side Row 3
    Right Side Row 1
    Right Side Row 2

    CSS

    .left-column, .right-column{
      float:left;
    }
    .left-column{
      width:30%; 
    }
    .right-column{
      width:60%; 
    }
    div{
      padding:10px;
      border:solid 1px black;
    }
    

    Screenshot of results

    Screenshot of rendered HTML

    提交回复
    热议问题