<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
 <meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
 <meta http-equiv="Content-Language" content="GB2312" />
 <meta name="author" content="DSclub,兀儿-干部" />
 <meta name="Copyright" content="任兀" />
 <meta content="代码" name="keywords" />
    <title>XHML1.0 DOC</title>
 <style type="text/css" id="internalStyle">
body{margin: 0; padding: 0;}
p{display:block;font: bold 12px serif; color: #339;}
 #header{height: 64px; background: #F00; color: #FFF; font: bold 24px "Impact",serif;line-height:160%; text-indent: 36px;}
 #maincontent{margin-top:20px;}
 #right{float: right; width: 160px; background: #DEF;}
 #left{margin-right: 180px; background: #CFC; color: #999; }
 #left h1{text-decoration: underline;font: italic bold 16px serif;}
 #footer{clear: both; min-height: 80px; background: #EEE; text-align: center; font: italic bold 20px "Impact",sans-serif; color: #999;margin-top:20px;}
 </style>
  </head>
  <body>
<div id="header">Head Info</div>

<div id="maincontent">
  <div id="right">
 <p>Right Info</p>
 <p>#right{</p><p>float: right; </p><p>margin: 20px; </p><p>width: 160px; </p><p>background: #DEF;</p><p>}</p>
  </div>
    <div id="left">
     <h1>Style:</h1>
     <p>#left{</p>
     <p>margin-right: 180px;</p>
     <p>background: #CFC;</p>
     <p>color: #999;</p>
     <p>}</p>
     <h1>Main Content! Main Content! Main Content! Main Content! Main Content! Main Content! Main Content! </h1>
     <h1>Main Content! Main Content! Main Content! Main Content! Main Content! Main Content!</h1>
     <h1>Main Content! Main Content! Main Content! Main Content! Main Content! </h1>
     <h1>Main Content! Main Content! Main Content! Main Content!</h1>
     <h1>Main Content! Main Content! Main Content!</h1>
     <h1>Main Content! Main Content!</h1>
     <h1>Main Content!</h1>
     </div>
  </div>
 <div id="footer">Powered By DSclub</div> 
  </body>
</html>

一个三行两列右列固定左列自适应宽度的CSS相关推荐

  1. [html] 写一个三栏布局,中间固定,两边自适应(平均)

    [html] 写一个三栏布局,中间固定,两边自适应(平均) <style>html,body {height: 100%;margin: 0;padding: 0;}.container ...

  2. [html] 写一个三栏布局,两边固定,中间自适应

    [html] 写一个三栏布局,两边固定,中间自适应 position + marginfloat + marginflex 个人简介 我是歌谣,欢迎和大家一起交流前后端知识.放弃很容易, 但坚持一定很 ...

  3. 三列布局-中间固定俩边自适应-和两边固定中间自适应布局

    中间固定俩边自适应 1 <!doctype html> 2 <html> 3 <head> 4 <meta charset="utf-8" ...

  4. flex布局右列固定左列自适应,遇到white-space nowrap 影响布局超长的问题

    关于display:flex碰上white-space nowrap 影响布局的问题 缘由:想用flex实现,右边固定,左边文字自适应,并自动换行. 问题:文字撑满不换行 布局效果如下图: 代码如下: ...

  5. 两个div右侧固定,左侧自适应屏幕

    先上一张截图 再上代码 css: bigBox{margin:0;} .rightBox{position:fixed;right:0;top:200px;width:350px;height:300 ...

  6. 页面左边导航固定,右边自适应宽度

    模式一: <style type="text/css"> div { height:300px; border:2px solid #306;} .left{width ...

  7. div+css经典三行两列布局

    写在前面 在面试的时候遇到这样一个笔试题,使用div+css布局一个三行两列的页面.这里主要考察的是css中postion的具体用法.详细信息可参考我这篇文章: [HTML/CSS]说说positio ...

  8. 在php中页面布局 3列左右侧固定中间自适应居中,css三列布局--两边固定中间自适应和中间固定两边自适应...

    三列布局 本篇讲三列布局,面试常考题,自己总结的,如有什么问题,欢迎指出!我会用红色标注出主要作用部分,都是最精简的写法,,没有多余的修饰. 布局方式一:两边固定中间自适应 1.flex布局 思路:将 ...

  9. CSS如何实现”右部宽度固定,左部自适应“的布局

    吃过晚饭后,开始刷前端笔试题,却遇到了一道CSS难题--使用CSS实现左部自适应.右部固定宽度为200px的布局.当时第一眼看到题目时,以为只是一道很简单的题目.不就是定义两个左浮动的div,右部的宽 ...

最新文章

  1. 微信小程序顶部tab切换以及滑动
  2. Git基本命令 -- 别名 + 忽略 + 推送
  3. c语言测试代码怎么写,初学C语言,写了一个测试手速的工具,代码发上来,存着。。...
  4. 浅析网站建设之初应该从哪些方面进行考虑?
  5. B组前导码功率偏移(messagePowerOffsetGroupB)
  6. vue修改html片段的样式无效,vue 组件中添加样式不生效的解决方法
  7. 优秀学生专栏——孙振涛
  8. 如何在Hibernate中维护表的历史记录
  9. 简单仿百度自动搜索框
  10. 动手学深度学习(PyTorch实现)(九)--VGGNet模型
  11. FileProvider的使用
  12. Python 进阶——标准散列机制
  13. python 链表操作 优化_Python:如何修改列表时内存的使用和优化?
  14. 去年直播android和ios打赏,iOS直播类APP上架历程
  15. 经典Hbase面试7题(附答案)
  16. 数据挖掘 | 航空公司客户流失预测
  17. File和MultipartFile互转
  18. 外贸:圣诞新年祝福语语
  19. STM32输出PWM信号(库函数版本)
  20. 计算机所有用户ev,EV屏幕共享(电脑屏幕共享助手)V1.0.1 免费版

热门文章

  1. VTK:Filtering之SurfaceFromUnorganizedPoints
  2. OpenCV交互式相机校准应用
  3. Qt Creator调试Qt Quick示例应用程序
  4. C++两个整数的总和是否为整数溢出的算法实现(附完整源码)
  5. C++非递归合并排序的通用实现算法(附完整源码)
  6. QT的QIntValidator类的使用
  7. C++ 成员函数做友元
  8. A01_[NumPy中文网]数组基础(创建数组,多维数组切片,数组属性)、使用数组(基本操作符,数组特殊运算符)、索引(花式索引,布尔索引,缺省索引)
  9. presto-server-0.198集群安装
  10. struts2 的struts.properties配置详解