Creating 3-col layout with fixed-width middle column?

Posted in dotnet, vb, vb.net | No Comments »

The following page has a left and right column with fixed width, and the middle column takes up the remaining space.

I'd like to have a fixed-width middle column, and that the left and right columns take up all remaining space equally between both columns. I've tried several different css layouts, but they haven't worked.

Any help is appreciated.

Thanks.

ASPX

<%@ Page Language="C#" %>

<!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 runat="server">
<link href="datalist_onePage.css" rel="stylesheet" type="text/css" />
    <title></title>
</head>
<body>
<form id="form1" runat="server">
<div class="container">
<div class="left">Left
</div>
<div class="right">Right
</div>
<div class="middle">Middle
</div>
</div></form>
</body>
</html>

CSS

.container {
  width: 100%;
margin: auto;
text-align: left;
}

.left {
  float: left;
  width: 200px;
  background-color:Red;
}

.middle {
  top: 10px;
  background-color:Blue;
}

.right {
  float: right;
  width: 90px;
  background-color:Green;
}

Similar:

  1. Master pages — Getting calling page name Can someone tell me how to get the name of the child page being called in a Master page scenario. For example, if I have...
  2. making clean page via page.tpl.php I have a Drupal module creating a page via hook_menu(). I am trying to make it so the page has no extraneous html output, only...
  3. sqlite column width Hello, i’m executing PRAGMA table_info over a sqlite db PRAGMA table_info(my_table); And these are the columns retrieved: name type notnull dflt_value pk I noted there...
  4. Opening webpage having stylesheets in masterpage contentplaceholder i got little problem with opening a webpage in masterpage’s contentplaceholder.To open a webpage in contentplaceholder of masterpage i need to do isremove html tag...
  5. VB.NET: ListView Checkbox ALWAYS in first column Hi, I have a listview with checkbox property set to true, and I also allow column reordering. The problem is that when someone moves the...

Leave a Reply