DIV页面分部

  1. JSP
  2. <%@ page language="java" contentType="text/html; charset=utf-8"
        pageEncoding="utf-8"%>
    DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>页面总体布局title>
    <link href="CSSDIVde.css"  type="text/css" rel="stylesheet">
    head>
    <body>
    
    <div id="left">左边div>
    <div id="right">
    <div id="righttop">
    <table width="45"  border="1" align=right  >
    <tr>
    <td><a href="http://localhost:8080/First/login/login2.jsp">登录a>
    td>
    tr>
    table>
    div>
    <div id="rightcenter">
    <table width="80"  border="1" align=right  >
    <tr>
    <td>第2表第1个td><td>第2表第2个td>
    table>
    div>
    div>
    body>
    html>

     

  3. CSS
    @charset "UTF-8";
      #left{
      background-color:#00cc33;
      border:1px soild #ff3399;
      width:400px;
      height:400px;
      float:left;
      }
      #right{
      background-color:#00ffff;
      border:1px soild #ff3399;
      height:400px;
      width:1000px;
      }
      #righttop{
      background-color:red;
      border:1px soild #ff3399;
      height:80px;
      width:1000px;
      }
      #rightcenter{
      background-color:#ffffff;
      border:1px soild #ff3399;
      height:160px;
      width:1000px;
      }
     .box{
       width:200px;
       height:50px;
       border:5px solid #00f;
       margin:20px;
       color:red;
       text-align:center;
       
       }

     

  4. 运行
  5.  

你可能感兴趣的:(DIV页面分部)