2-Column Div Layout: Right Column with Fixed Width, Left Fluid
Question:
You're seeking a solution to create a two-column layout with a fixed-width right column and a flexible left column. Despite exploring various suggested approaches, none have met your specific needs.
Answer:
To achieve your desired layout, the following modifications are necessary:
Example HTML and CSS:
<div class="container"> <div class="right"> Right content fixed width </div> <div class="left"> Left content flexible width </div> </div>
.container { height: auto; overflow: hidden; } .right { width: 180px; float: right; background: #aafed6; } .left { float: none; background: #e8f6fe; width: auto; overflow: hidden; }
By implementing these adjustments, you can create the desired two-column layout with a fixed-width right column and a fluid left column.
The above is the detailed content of How to Create a 2-Column Layout with a Fixed-Width Right Column and a Fluid Left Column?. For more information, please follow other related articles on the PHP Chinese website!