css - How to stretch a div vertically and horizontally to occupy all the space? -


this 2 part question, believe, third , fourth, bonus twist.

  1. what doing wrong height of purple set 100% little bit high?

  2. how can set width of purple goes 100% of remaining space?

  3. is way rid of spacing between yellow , purple alter html code putting on same line?

  4. how can remove margin green border holds between self , outer component?

jsfiddle.net/jl8e5/1/

div.faqticlelist {   background: #ffdd00;   /* yellow */   display: inline-block;   padding: 3px;   width: 200px;   height: 150px; } div.faqticlepreview {   background: #bb88ff;   /* purple */   display: inline-block;   padding: 3px;   width: auto;   height: 100%; } 

i'm not sure if understand goals. assumed:

  1. fixed width left
  2. variable width right

http://jsfiddle.net/wxme4/

css

body{     margin: 0;     padding: 0;     width: 100%; }  div.faqticlelist {   background: #ffdd00;   width: 200px;   height: 100%;   float: left; } div.faqticlepreview {   background: #bb88ff;    width: 100%;   height: 100%;   margin-left: -203px;   padding-left: 203px; }  div.container {   border: solid 1px #007700;   margin: 0px;   height: 100px;   //overflow: hidden;   //overflow: auto; }  div.faqticlelist div, div.faqticlepreview div {     padding: 3px; } 

script

document.getelementbyid("faqticlelist").innerhtml = "<div>faqticlelist</div>"; document.getelementbyid("faqticlepreview").innerhtml = "<div>faqticlepreview</div>"; 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -