html - css layout fixed width and variable width on same line -


With table

I can easily have a row with 2 columns, column 1 variable width and column 2 pixels and columns Fixed size changes to size 1 to fill the available space. I am changing the CSS and thinking how to do it with CSS .. and make sure that both divs / columns are on the same line and do not wrap up.

  & lt ;! DOCTYPE HTML Public "- // W3C // DTD XHTML 1.0 Transcription // N" "http://www.w3.org/TR /xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html & gt; & Lt; Top & gt; & Lt; Style type = "text / css" & gt; Html, body, div {margin: 0; Padding: 0; Limit: 0 none; } #left {margin-right: 300px; Background: yellow; } #wright {width: 300px; float right; Background: #ccc; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "wrapper" & gt; & Lt; Div id = "right" & gt; Fixed & lt; / Div & gt; & Lt; Div id = "left" & gt; Variable & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

There is a right column of 300 pixels and one variable is the left column. The DOCTYPE is just there to treat the wrongdoing, its use has also been recommended.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -