473,626 Members | 3,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Resizing DIVs to max width

30 New Member
Hi All,

I want to create a flexible DIV based layout.

Here is design layout, globtier 1st template

Layout should have horizontal scrolled on 800 resolutions.
And, It should not stretch after 1200 page width, that means pages should be stretch from 800 to 1200 px in width.

It should support at least IE/Firefox and Opera browser.

Can you help me to create this layout?


Thanks
Oct 5 '06 #1
2 3006
steven
143 New Member
Not possible with IE.

There's a CSS property for max-width and min-width, along with height too... but IE doesn't recognise these properties unfortunately.

You can cheat a little, make it dynamic for one browser and not for another, using the underscore "hack".

[code]
div#content {
min-width: 800px;
max-width: 1200px;
_width: 1200px; /* for InternetExplode r */
}

The underscore hack basically works because IE doesn't recognise properties or names that begin with an underscore. Essentially, it ignores the existance of the beginning underscore, so whilst other browsers see _width and understand that there's no such property called _width, IE only sees 'width'.

Also, are you really working on this site? Because firstly, that doesn't look like a template that's just been designed and you're not sure whether to use it. That's a complete website, which apparently is finished and has complete content (and furthermore is currenty already live).
Oct 5 '06 #2
jitu78
30 New Member
Not possible with IE.

There's a CSS property for max-width and min-width, along with height too... but IE doesn't recognise these properties unfortunately.

You can cheat a little, make it dynamic for one browser and not for another, using the underscore "hack".

[code]
div#content {
min-width: 800px;
max-width: 1200px;
_width: 1200px; /* for InternetExplode r */
}

The underscore hack basically works because IE doesn't recognise properties or names that begin with an underscore. Essentially, it ignores the existance of the beginning underscore, so whilst other browsers see _width and understand that there's no such property called _width, IE only sees 'width'.

Also, are you really working on this site? Because firstly, that doesn't look like a template that's just been designed and you're not sure whether to use it. That's a complete website, which apparently is finished and has complete content (and furthermore is currenty already live).

Thanks Steven

Your code really fantastic...:)

My Problem has been solved.
Oct 6 '06 #3

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

Similar topics

9
32046
by: Bryan R. Meyer | last post by:
Hello Everyone, The problem of browser resizing has become an issue for me. While redesigning my webpage, I set the left and right margins to be auto so that my content would be centered. However, there are images that I used absolute positioning in order to place them in the appropriate location on my page. When I do a browser resize, these images do not move (obviously). However, the rest of my content is auto centered as...
6
6197
by: Robert J. O'Hara | last post by:
I'm one of those people who practices what some consider "dull" and others consider "elegantly conservative" page design. I appreciate good traditional typography and standards-compliant liquid displays, and I only reluctantly experiment with two-column layouts from time to time. One component of traditional book typography has always been the figure/caption combination. I haven't been following discussion on this topic for a year or...
5
2641
by: Robert J. O'Hara | last post by:
For some time I've made use of the max-width property in CSS to cause my pages to appear as a centered block against a contrasting background. This works well in new browsers (Mozilla, etc.) and falls back fine in IE6 and lesser creations. As one who practices "classic" (i.e. dull) typography, this has always been satisfactory since I've always used one-column pages. I'm now trying a two column layout so I can include a sidebar, and am...
2
5482
by: David Winter | last post by:
This is a totally trivial CSS problem, I'm sure, but I don't get it. I want a centered DIV with a fixed width between two other DIVs that should fill the rest of the window/viewport (= 100%). How do I achieve this? I tried width:auto for the buffer DIVs, but it didn't work. This should at least work in IE 5.5 and Opera. A totally standards-compliant solution would be appreciated, of course ... :/ This is waht I have:
15
13494
by: red | last post by:
How do I center two side by side divs ? I've been writing css pages for a while but there's one thing tha still eludes me. I can center a div with margin auto. I can place two divs side by side with float. But I can't center two side by side divs. If I float them and give them auto margins, the auto margins are ignored. If I wrap the two floated divs in another div, the two divs have no
4
2746
by: johkar | last post by:
The below script sets and maintains the equal heights of 2 (or 3) divs which are floated next to each other on a page. I want to ensure that I have not overlooked anything and it will not error. In other words, it either executes successfully or not at all. This script is a compilation of code found on various posts along with my personalization thrown in to meet our specs. Note that this is just a "nice to have" script so if it...
2
3463
by: =?iso-8859-1?q?Jean-S=E9bastien?= | last post by:
hello, how can i resize my html content to displayed size? all my divs inside are scrollable and resized on loading and on resizing. thanx
9
5293
by: dli07 | last post by:
Hello, I'm trying to convert a piece of code that creates a dynamic vertical resizing bar in a table from internet explorer to firefox. It's based on a post from http://blogs.crankygoblin.com/blogs/geoff.appleby/pages/50712.aspx. I've also read the post on this topic by bggraphics, but he doesn't arrive at a final result. The main problem I am having is that the layerX and layerY event properties don't work. They're supposed to return the...
10
7054
by: mishrarajesh44 | last post by:
hii all, I am facing a problem currently.. i have a script for image uploading and resizing.. the image uploading takes place properly for every size images.. but, the resizing works for only small sized iamages.. for eg. resizing takes place for 70 kb sized images but fails for 600kb or more.. my code is below..
0
8269
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
8203
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,...
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8368
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
8512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7203
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
6125
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
4094
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
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.