473,587 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ 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’m trying to figure out is how to change the height of one div to use repeatedly within various pages of a website I’m 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’m 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’m 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 1891
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
1837
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. One ISP told me this couldn't be done - is IIS really that limited? I want to be able to suggest to my ISP (based on any advice you can give) how...
7
7661
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 that portion of the screen? I know how frames work. I hate frames. I like the SPAN tag, and I would like to be able to change the text within...
2
2263
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 be a series of static html pages. I will keep all the data locally and would generate the required pages and upload them whenever I needed to. I do...
1
4625
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 menu items I display a html page (which can be found in a specific folder) in the center of my aspx page. What is the easiest way to accomplish that? Is...
3
1336
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 ones. The problem we have is that the websites are cached at the Cisco Content Engines and take upto 3days to time out and update, so when a...
2
1317
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. Basically I want to scrape some web pages and populate a database. Does anybody have a snippet of code that could me out get the "text"?
1
1531
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 301 redirects for the individual html pages by adding the redirect code (it has to be done on a page by page basis) in the Session_Start event. ...
2
2454
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
1657
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 another HTML page should be visible or hidden?
1
1869
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 = d.getMonth() + 1; var result; function openCalender() { if (month==1) { result="calender1/Jan08.htm"; return...
0
7915
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...
0
7843
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...
0
8339
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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...
0
6619
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...
1
5712
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...
0
5392
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...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.