Results 1 to 3 of 3

Thread: table-like divs [Resolved]

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    Resolved table-like divs [Resolved]

    I want to know if this is even possible:

    I have an internal site setup with tables right now. It has a left-side navigation menu with a larger content area on the right.

    The setup works great in all browsers. The problem is, I want to give them the ability of hiding the menu. This would be easy with a div, because I could just set the style display property to none with Javascript.

    But since I'm using tables, it doesn't give me the ability to do that.

    My problem with divs is that I can't get the concept of "set width for left and the right side fills the remainder. Plus there are all sorts of issues to get this to play correctly in all the browsers.

    So I guess my question is, is there a way to create something like what I want using something other than a table that reacts nicely to the CSS display attribute?

    I hope that was clear enough. Any guidance would be greatly appreciated.

    And I have made a quick attempt, with bad results:

    Code:
    .navigate {
    	background-color: Gray;
    	border: 0px;
    	margin: 0px;
    	padding: 0px;
    	width: 140px;
    	display: inline;
    	height: 200px;
    }
    
    .content {
    	margin: 0px;
    	border: 0px;
    	padding: 0px;
    	background-color: Teal;
    	display: inline;
    	height: 200px;
    }
    Last edited by ober0330; Nov 22nd, 2004 at 10:20 AM.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    What about this?

    Code:
    <!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>
    	<title>2 Column Layout</title>
    	<style type="text/css">
    		body{
    			margin: 0;
    			padding: 0;
    		}
    		#left{
    			width: 140px;
    			float: left;
    			background-color: red;
    		}
    		#content{
    			background-color: green;
    		}
    
    	</style>
    </head>
    
    <body>
    	<div id="left">left</div>
    	<div id="content">content</div>
    </body>
    </html>
    Is that what you mean?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Now why didn't I think of that??

    That's perfect.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width