473,802 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to increase the height of left panel div as the content div increases.

2 New Member
Hello
Can any body help me with this
The problem is

As the text increses in height the side bar should also increase.

As shown in pic.
[IMG][/IMG]

Expand|Select|Wrap|Line Numbers
  1.  
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  6. <title>Untitled Document</title>
  7. </head>
  8. <style>
  9. body{
  10. margin:0px;
  11. height: 100%;
  12. }
  13. .home1
  14. {
  15. margin-left:20px;
  16. margin-top:20px;
  17. width:350px;
  18. clear:left;
  19. }
  20. .home1_text
  21. {
  22.     padding-left:4px;
  23.     font:9pt Arial, Helvetica, sans-serif;
  24.     float:left;
  25. }
  26. .home1_bar
  27. {
  28.     width:15px;
  29.     background-color:#90BFCF;
  30.     height:100%;
  31.     float:left;
  32. }
  33. </style>
  34.  
  35. <body>
  36. <div class="home1">
  37.                 <div class="home1_bar"></div>
  38.                 <div class="home1_text">We intend to assist deserving Indian manufacturers of workshop tools, to export in the world market using                 our experience and contacts of over 50 years.
  39.                 </div>
  40. </body>
  41. </html>
  42.  
  43.  
Mar 22 '07 #1
7 3051
Yanskopolis
9 New Member
It already does increase in height.
Mar 22 '07 #2
Yanskopolis
9 New Member
Oh wait, you're talking about the sibling div right? The only way you could make it's height relative to the content of a sibling element is to use Javascript.
Mar 22 '07 #3
drhowarddrfine
7,435 Recognized Expert Expert
As usual, validate for your list of errors that will fix this problem.
Mar 22 '07 #4
AricC
1,892 Recognized Expert Top Contributor
You can use percentages to help. When you say the text increases you mean when you add content?
Mar 22 '07 #5
mahenk
2 New Member
You can use percentages to help. When you say the text increases you mean when you add content?
Hello Folks,
let me agian explain my problem.
if you see the code
the div with class home1_bar should increase in height as the text matter in the div with class home1_text increases.
Presently the div with class home1_bar remains of the same height irrespective of the increase in the text matter in div with home1_text.
Mar 23 '07 #6
drhowarddrfine
7,435 Recognized Expert Expert
And I repeat again, fix your errors to fix the problem.
Mar 23 '07 #7
oldunclebill
1 New Member
I have no idea what you're trying to accomplish, but this will give you a different result:

<div class="home1">
<div class="home1_ba r">
<div class="home1_te xt">We intend to assist deserving Indian manufacturers of workshop tools, to export in the world market using our experience and contacts of over 50 years.
</div>
</div>
</div>
Mar 23 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2724
by: Steve Bottoms | last post by:
Hi, all! Using VB as code-behind in asp.net page... I have a TABLE control which I'm building dynamically. After the table is built, I'm trying to retrieve the HEIGHT property of that table (table.height.value) to be able to dynamically position the next elements on the form. However, this control property is coming back as -0- every time. I also try to get the table height with Javascript after-the-fact (table.style.height), but that...
1
1710
by: Roland Dick | last post by:
Hello, I have a problem here with an ASP.NET website. The pages are supposed to use a single master page which just contains some images and a menu control on the top, below that is the content placeholder. What I would like to achieve is to always see the master page elements (the images and the menu control). In other words, the content placeholder should display a scrollbar, not the whole page.
4
12550
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0' cellpadding='0' cellspacing='0' style='border-collapse:collapse; width:100%; height:100%;'> <tr><td colspan='2' style='height:3em; border-bottom:1px solid
1
1906
by: Wotney | last post by:
Hoping someone out there can help... I have an UpdatePanel that uses Atlas/Ajax to update it's contents without having to postback the entire page. (pnlUpdate) Within pnlUpdate I have a normal panel holding a tree-view control. (pnlTreeView) All the controls on my page are dynamic in size. Eg. Height="80%", Width = "85%".
1
6491
by: Mike Collins | last post by:
I am trying to create some pages and have them take 100% of the window, but I cannot get 100% to work. If I set the height of my div, the page displays a scroll bar and it looks like I set the height to about 150%. I tried using CSS, now I am trying tables. Can someone show me where I am mixing things up? Thanks. --Master Sheet <%@ Master Language="C#" AutoEventWireup="true" CodeFile="master.master.cs" Inherits="pts" %>
3
4468
by: ianv2 | last post by:
Hi I have a div which contains my local navigation bar, which has a blue background and is next to the content div, at the moment however this blue background colour stops after the unordered list ? I would like the background colour to fill the entrire length of the localnav div How is this achieved with CSS?
2
4134
by: hobo38 | last post by:
Hi, I have tried to incorporate an image increase and decrease on mouseover from an earlier posting. Can anyone help me do this with multiple images? Here is the html page I have as a sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
6
4781
by: Jeff | last post by:
Nearly identical post in alt.www.webmaster, where it is languishing. I'd like a column that flows the full height of a page, even if you scroll down. If I did this: <div style="width: 100px;height=100%;background-color: red">
2
3357
by: ssmeshack | last post by:
Hai all, Im having problem to set minimum height to <td> tag. It only takes height only not min-height. Im ie7 browser and developing web based system in Visual Web Deveploper 2008 (C# .Net). Here is the entire code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="_Default" %> <%@ Register TagName="Ticket" Src="~/UserControl/Ticket.ascx" TagPrefix="uc1" %> <%@ Register TagName="User"...
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9561
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10281
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9111
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7597
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6835
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.