473,473 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to change the height of one div to use repeatedly within different HTML pages

17 New Member
Hi there!

Okay so basically what I知 trying to figure out is how to change the height of one div to use repeatedly within various pages of a website I知 creating.

I have about 10 different web pages and all of them differ in height. The home page has images and text on and I知 using a div called "content" which is 700px in height and this is fine to show the relative content. But I have another page which needs to be longer as more content and videos are placed on this page. In short, I have 10 different web pages that make up my web site and I would like to use the "content" div for each and every single page within the website instead of creating 10 different 'content' divs.

I've researched into the min-height and max-height properties and was wondering would this be the correct way of altering the height of the "content" div so elements can be placed in the div?

So I was thinking of making the "content" div have properties such as:

Expand|Select|Wrap|Line Numbers
  1. #content {
  2. min-height:600px;
  3. max-height:1000px;
  4. }
  5.  
As then I would be able to use the "content" div in each and every web page I知 creating instead of creating 10 different 'content' divs and naming them...#content-home #content-about-us #content-contact-us etc...

I look forward to any feedback.

Thanks,
James
Jun 7 '11 #1
2 1872
drhowarddrfine
7,435 Recognized Expert Expert
Those don't alter the height at all but limit them to that range.

Are you sure you need that at all? The div will expand/shrink with its content.
Jun 8 '11 #2
Elisabeth Dietz
3 New Member
Your div will get the needed size automatically if you fill it with content, but if you want to have the max and min set, your idea will work fine (except for Internet Explorer, as usual..)
Jun 8 '11 #3

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

Similar topics

10
by: Kenny Ashton | last post by:
Hi all Can anyone tell me the best way to set permissions to allow an ASP program to write new Html pages to my site's root folder, without chancing users also being able to write to the root....
7
by: Go USA! Go Israel! | last post by:
I was wondering if the following was possible: Instead of using a frameset which references other individual HTML files, have the <SPAN> tag reference another HTML file, which is placed within...
2
by: Nick | last post by:
Hi all, I'm about to embark on a new project and can't decide quite how to do it. In summary, I have a database whose data I want to use to create html pages for a website. The website will just...
1
by: Robert | last post by:
Display html pages within an aspx page I would like to display HTML pages within an aspx page.An example might be: I have an aspx page with a menu on the left side and by clicking on one of the...
3
by: Harry | last post by:
Hi there, we support a school network and schools are allocated webspace. To upload updates the schools website they FTP as follow - ftp://www.etc.etc.co.uk and upload new files to replace old...
2
by: MisterKen | last post by:
If I have the html from webpage loaded into a string. How would I use regex to return sections from within that html string? I want to be able to get the "text" back between two different tags....
1
by: jainamber | last post by:
Hi, We are in the process of launching a new asp.net site for our client, the old site was pure html. In order to preserve the search engine rankings of the html pages, I am trying to implement ...
2
by: hash4sp | last post by:
Hi there ! Can anyone tell me "how to Acess the values stored in Global Variables of .JS external files in different HTML Pages"???
3
by: shitalkarande | last post by:
How can we access an HTML page element from another HTML page? I want to make a HTML page which has a button which can set a variable value to true or false.Depending upon this value a field in...
1
by: Mohammed Rafeeq Ahmed | last post by:
hi All, I am using the following code to display the calender html pages in IFRAME automatically using javscript <script language="JavaScript"> var d = new Date(); var month =...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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用lanning, coding, testing,...
1
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...
0
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...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.