Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 06-05-2009, 12:29 PM   #1 (permalink)
Registered User
 
Join Date: Jun 2009
Posts: 1
OS: Mac OS X 10.5.6

My System

Question Automatically resizing DIV

Ok, so here is the situation. I have a page with a div on the side, on top, and on bottom. The div on the side is on the left at 225px. The div on top is 25px, and the div on bottom is 20px. What I want is a div in the middle of them all, and so it resizes (and is scrollable) based on the visitors browser size.
What I have works, but will not scroll, and is not the right width so I have to center all my content in it. Its just using the width of the browser, but pushed over a bit with a margin, so its actually hanging over underneath the sidebar.

A quick sketch of what I have is in the attachments.

Any ideas?

Key:
menu is the top.
bottom_menu is the bottom menu.
content is the part I need help with, in the center.
sidebar is what goes on the side.

CSS:
Code:
@charset "UTF-8";
/* CSS Document */

html **
	height:100%;
}

img
**
	border-style: none;
	color: #FFF;
	text-align: center;
}

body **
	height:100%;
	width:100%;
	margin:0px;
	padding:0px;
	background-color:#000;
}

.sidebar **
	background-image:url(../images/sidebar/background.png);
	background-repeat:repeat-y;
	width:225px;
	min-height:100%;
	position:fixed;
	top:25px;
	left:0px;
	overflow:hidden;
	padding-left:5px;
	padding-top:5px;
	font: 12px Helvetica, Arial, Sans-Serif;
	color: #666;
	z-index:1;
	}

.menu **
	background-image:url(../images/top_menu/background.png);
	background-repeat:repeat-x;
	width:100%;
	height:25px;
	position:fixed;
	top:0px;
	left:0px;
	overflow:hidden;
	padding-left:5px;
}

.content **
	width:100%;
	top:25px;
	height:100%;
	overflow:hidden;
	position:fixed;
	padding-left:5px;
	padding-top:5px;
	background-color:#FFF;
	margin-left:112px;
	font: 14px Helvetica, Arial, Sans-Serif;
}

.bottom_menu **
	background-image:url(../images/bottom_menu/background.png);
	background-repeat:repeat-x;
	width:100%;
	height:20px;
	position:fixed;
	bottom:0px;
	left:0px;
	overflow:hidden;
	padding-left:5px;
	z-index:2;
	font: 12px Helvetica, Arial, Sans-Serif;
}
HTML (DIV Placement):
Code:
<body>
<div class="sidebar">CONTENT IN SIDEBAR</div>
<div class="menu">CONTENT IN TOP MENU</div>
<div class="bottom_menu">CONTENT IN BOTTOM MENU</div>
<div class="content">CONTENT IN CONTENT</div>
</body>
Attached Images
File Type: jpg mockup.jpg (33.2 KB, 10 views)
devinpitcher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 06-07-2009, 03:10 AM   #2 (permalink)
Registered User
 
Join Date: May 2009
Posts: 16
OS: Windows Vista Home Premium


Re: Automatically resizing DIV

Im not sure what you are asking but here is what i think you mean:

You want a dynamic DIV depending on how much space available on the visitors browser:
width:100%;

You want the DIV to be scrollable IF the content inside doesnt fit in the space made by the visitors browser:
overflow:scroll;

I hope this is what you wanted xD
__________________
Sticks and stones may break my bones, but whips and chains excite me.
ParsaAkbari is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 02:21 AM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85