473,382 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

2
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 3030
It already does increase in height.
Mar 22 '07 #2
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 Expert 4TB
As usual, validate for your list of errors that will fix this problem.
Mar 22 '07 #4
AricC
1,892 Expert 1GB
You can use percentages to help. When you say the text increases you mean when you add content?
Mar 22 '07 #5
mahenk
2
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 Expert 4TB
And I repeat again, fix your errors to fix the problem.
Mar 23 '07 #7
I have no idea what you're trying to accomplish, but this will give you a different result:

<div class="home1">
<div class="home1_bar">
<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.
</div>
</div>
</div>
Mar 23 '07 #8

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

Similar topics

2
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...
1
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...
4
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'...
1
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...
1
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...
3
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...
2
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: ...
6
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:...
2
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). ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.