473,396 Members | 1,738 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,396 software developers and data experts.

script to resize boxes.

71
I've got a page that has 6 boxes in a grid (like dots on a dice). In each box goes some current events type stuff. I'm trying to find a way to make it so that the boxes beside each other are always the same size.

So if my boxes are lined up like this:
A-B
C-D
E-F

Then I want A & B to be the same size, and C & D, and E & F. But for example box A and box C would not need to be the same size. They all have the same widths, it's the heights I'm trying to match?

Is there an easy way to do this with a script, have it look at the length of both boxes, then match them both to the longer of the two? I tried to implement something like this, but I couldn't quite get it to work. I'm not sure if I'm placing it in the wrong spot to run, or if my code is wrong. Any help would be greatly appreciated.
Sep 21 '07 #1
2 1405
rnd me
427 Expert 256MB
you can set the height in CSS to a pixel value, or a percent of the parent element. using position:absolute, and overflow:sroll, you can fit odd shaped fragments in same-sized containers.
Sep 21 '07 #2
rsteph
71
I've got the default values set up for the boxes in my .css file. However in some cases images or text are entered that expand the boxes vertically... Making one box larger than the other. I'd like to make sure that any two side by side boxes always have the same height (are fit to the taller of the two boxes), regardless of the content inside.


you can set the height in CSS to a pixel value, or a percent of the parent element. using position:absolute, and overflow:sroll, you can fit odd shaped fragments in same-sized containers.
Oct 1 '07 #3

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

Similar topics

0
by: Henk Verhoeven | last post by:
(Reply on this newsgroup to an email - reply by email did not work) Wolfman wrote: > > Hi, > I found your Email in the php Newsgroup. > I was looking for some way to resize some graphiks on my...
3
by: niconedz | last post by:
Hi The following code works fine in IE but not Firefox. It's a little script that zooms an image and resizes the window to fit. Can anybody tell me what's wrong? Thanks Nico == btw.....
4
by: Rob Richardson | last post by:
Greetings! I have a form with a listview, a menu, and a few text boxes, labels and command buttons. I want to resize the listview when the form is resized to that the widths of the spaces...
7
by: Dr J R Stockton | last post by:
I've heard that at <URL:http://www.merlyn.demon.co.uk/js-clndr.htm#P> and using Opera the suffixed dates in the yellow box appear in a single long line instead of in the obvious weekly manner. ...
11
by: Ajith Menon | last post by:
I have created a windows application in which the form needs to be resized on the MouseMove event. The windows resize function takes a lot of CPU cycles. And as the resize function is called on the...
1
by: kksandeep | last post by:
i am using this three files to uplod file. i got this file from net but i think these have some error. i am new to this field plz help the script i found is some helpful but not too that i need ...
3
by: jkwok | last post by:
Hi, I have a form with two rich text boxes and two buttons. Some of the users want to be able to maximize and/or resize the form and have the rich text boxes resize to fit and the buttons always...
9
by: neovantage | last post by:
Hey geeks, I am using a script PHP Thumbnailer which resize image at run time. But it is not working in my case as i have integrated that script by studying it's documentation. Here is the URL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
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
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,...
0
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...
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—planning, coding, testing,...

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.