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

shrinkable/expandable layout with CSS?

Honestly have not touched CSS for years, so, back to square one on
this...

What I'd like to do if possible with CSS is this:
create a layout that is shrinkable or expandable when a user drag it,
kind of like a window on a desktop, you can drag it to make it bigger
or smaller... so, the content within would also be proportionally
shrunk or expanded...

Is it possible with CSS? If so, could you show an example?

Thanks.
P.S. I've searched this NG and googled for it to no avail.

Nov 24 '07 #1
8 2692
On 2007/11/23 15:56 (GMT-0800) Don Li apparently typed:
Honestly have not touched CSS for years, so, back to square one on
this...
What I'd like to do if possible with CSS is this:
create a layout that is shrinkable or expandable when a user drag it,
kind of like a window on a desktop, you can drag it to make it bigger
or smaller... so, the content within would also be proportionally
shrunk or expanded...
Is it possible with CSS? If so, could you show an example?
Thanks.
P.S. I've searched this NG and googled for it to no avail.
I don't know why anyone would think it a good idea. I think it's really dumb
for objects like text and images to vary in size depending on window size.
You could use percentages to size images and containers, but percentages for
fonts apply based upon ancestor font sizes, not container sizes. You'd have
to use something other than CSS for them, like this example:
http://nickcowie.com/ . Note there if your zoom or default font size is more
than nominally larger than about 16px, no matter the window size, it has a
horizontal scrollbar.

What's wrong with sizing based upon font size? That way, with care, you can
maintain good proportions within reasonable ranges of window sizes, as here:
http://mrmazda.no-ip.com/auth/Sites/ksc/
--
" A patriot without religion . . . is as great a
paradox, as an honest man without the fear of God."
John Adams

Team OS/2 ** Reg. Linux User #211409

Felix Miata *** http://mrmazda.no-ip.com/
Nov 24 '07 #2
In article
<8d**********************************@d61g2000hsa. googlegroups.co
m>,
Don Li <ta********@gmail.comwrote:
Honestly have not touched CSS for years, so, back to square one on
this...

What I'd like to do if possible with CSS is this:
create a layout that is shrinkable or expandable when a user drag it,
kind of like a window on a desktop, you can drag it to make it bigger
or smaller... so, the content within would also be proportionally
shrunk or expanded...

Is it possible with CSS? If so, could you show an example?
This shrinks and expands with the window of the browser:

http://tinyurl.com/ysz65b

Want anything more fancy? Tell me exactly what you want and I
will go into the dorayme factory and see what can be found for
you.

--
dorayme
Nov 24 '07 #3
In article <13*************@corp.supernews.com>,
Felix Miata <Ug********************@dev.nulwrote:
I think it's really dumb
for objects like text and images to vary in size depending on window size.
It is not "really dumb" to ever want this for images.
Unfortunately, it cannot be done well across platforms and
browsers. It can be done well up to a reasonable point on Macs on
good browsers like Safari and FF.

--
dorayme
Nov 24 '07 #4
Do not assume why there's such a need/rationale for it, there's tons
and tons of things you do not know in the world.

It appears that you failed to understand my post (so did the other
one). Let me use an HTML example to further explain it.
<TABLE>
<tr>
<td>Main Component</td>
<td>
<table><tr><td>subcomponent a </td></tr></table>
</td>
</tr>
</TABLE>

Let's say, the inner table currently takes about 25% width of the
current screen (the content within the inner table is readable), now,
suppose, I want more real estate for other use for the current screen,
so, if I can shrink the inner table to,s ay, 5% width of the current
screen, that would be desirable. With a desktop window, one can drag
to be BIGGER or smaller, not HTML, nor CSS? That's the question I
was asking! Your answer would be "yes, CSS can do that, and here's
how" or "No, CSS can't" as simple as that, no SB!!

Another option would be, visible attribute but less desirble...
>On Nov 23, 7:25 pm, Felix Miata <UgaddaBkidding.due2...@dev.nulwrote:
On 2007/11/23 15:56 (GMT-0800) Don Li apparently typed:
Honestly have not touched CSS for years, so, back to square one on
this...
What I'd like to do if possible with CSS is this:
create a layout that is shrinkable or expandable when a user drag it,
kind of like a window on a desktop, you can drag it to make it bigger
or smaller... so, the content within would also be proportionally
shrunk or expanded...
Is it possible with CSS? If so, could you show an example?
Thanks.
P.S. I've searched this NG and googled for it to no avail.

I don't know why anyone would think it a good idea. I think it's really dumb
for objects like text and images to vary in size depending on window size.
You could use percentages to size images and containers, but percentages for
fonts apply based upon ancestor font sizes, not container sizes. You'd have
to use something other than CSS for them, like this example:http://nickcowie.com/. Note there if your zoom or default font size is more
than nominally larger than about 16px, no matter the window size, it has a
horizontal scrollbar.

What's wrong with sizing based upon font size? That way, with care, you can
maintain good proportions within reasonable ranges of window sizes, as here:http://mrmazda.no-ip.com/auth/Sites/ksc/
--
" A patriot without religion . . . is as great a
paradox, as an honest man without the fear of God."
John Adams

Team OS/2 ** Reg. Linux User #211409

Felix Miata *** http://mrmazda.no-ip.com/
Nov 24 '07 #5
VK
On Nov 24, 4:26 am, Don Li <tatata9...@gmail.comwrote:
<TABLE>
<tr>
<td>Main Component</td>
<td>
<table><tr><td>subcomponent a </td></tr></table>
</td>
</tr>
</TABLE>

Let's say, the inner table currently takes about 25% width of the
current screen (the content within the inner table is readable), now,
suppose, I want more real estate for other use for the current screen,
so, if I can shrink the inner table to,s ay, 5% width of the current
screen, that would be desirable. With a desktop window, one can drag
to be BIGGER or smaller, not HTML, nor CSS? That's the question I
was asking! Your answer would be "yes, CSS can do that, and here's
how" or "No, CSS can't" as simple as that, no SB!!
Yes, CSS has tools one can interface with to drag/resize particular
content blocks on the display.

No, CSS by itself has no necessary tools to monitor drag/drop mouse
events and to change CSS rules accordingly. CSS is not a Turing-
complete language, other words it is a non-computational language or
even more simple it is not a programming language.

You may write your own binding/behavior pair to bind it to the
necessary block over CSS rule (-moz-binding, behavior) but it is just
another way around of using a real programming language - JavaScript -
for the task.
Nov 24 '07 #6
On Nov 24, 6:53 am, VK <schools_r...@yahoo.comwrote:
On Nov 24, 4:26 am, Don Li <tatata9...@gmail.comwrote:


<TABLE>
<tr>
<td>Main Component</td>
<td>
<table><tr><td>subcomponent a </td></tr></table>
</td>
</tr>
</TABLE>
Let's say, the inner table currently takes about 25% width of the
current screen (the content within the inner table is readable), now,
suppose, I want more real estate for other use for the current screen,
so, if I can shrink the inner table to,s ay, 5% width of the current
screen, that would be desirable. With a desktop window, one can drag
to be BIGGER or smaller, not HTML, nor CSS? That's the question I
was asking! Your answer would be "yes, CSS can do that, and here's
how" or "No, CSS can't" as simple as that, no SB!!

Yes, CSS has tools one can interface with to drag/resize particular
content blocks on the display.

No, CSS by itself has no necessary tools to monitor drag/drop mouse
events and to change CSS rules accordingly. CSS is not a Turing-
complete language, other words it is a non-computational language or
even more simple it is not a programming language.

You may write your own binding/behavior pair to bind it to the
necessary block over CSS rule (-moz-binding, behavior) but it is just
another way around of using a real programming language - JavaScript -
for the task.- Hide quoted text -

- Show quoted text -
Thank you.
Nov 25 '07 #7
Don Li wrote:
Honestly have not touched CSS for years, so, back to square one on
this...

What I'd like to do if possible with CSS is this:
create a layout that is shrinkable or expandable when a user drag it,
kind of like a window on a desktop, you can drag it to make it bigger
or smaller... so, the content within would also be proportionally
shrunk or expanded...

Is it possible with CSS? If so, could you show an example?
No, you need Javascript. The only dynamic styling available solely
through CSS (pseudo-classes for links) relates to the current state--is
the element being activated *now*, does the element have the focus
*now*? There isn't any persistence.

Nov 26 '07 #8

"Don Li" <ta********@gmail.comwrote in message
news:8d**********************************@d61g2000 hsa.googlegroups.com...
Honestly have not touched CSS for years, so, back to square one on
this...

What I'd like to do if possible with CSS is this:
create a layout that is shrinkable or expandable when a user drag it,
kind of like a window on a desktop, you can drag it to make it bigger
or smaller... so, the content within would also be proportionally
shrunk or expanded...

Is it possible with CSS? If so, could you show an example?

Thanks.
P.S. I've searched this NG and googled for it to no avail.
Do you mean like this?

http://nrkn.com/overview.html

Or do you mean by content shrinking or expanding, that when you resize the
window, the font-size changes too?

Nov 26 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ralf Höppner | last post by:
Does anyone know, if it is possible to create an explorer-like expandable tree from an XML File ? Maybe using XSLT ? I'd like to use it on an HTML web page. thanks ! Ralf
2
by: Amir S. | last post by:
Hi guys... Does anyone know a tool (preferably free) that would generates code for the cute expandable navigation system that uses pluses and minuses? An example can be seen on the left nav...
1
by: Mel | last post by:
has anyone built a CSS based expandable menus yet ? i can see that its do(able) using display=0|1 function thanks for any info
4
by: Doug | last post by:
Hi - I'm looking to code some javascript that has an event handler tied to an image ("a down arrow") that will expand code that was hidden on the page load. It's pretty simple, I have an...
0
by: Pradeep | last post by:
Hi all, When i change an expandable property of an object from the property grid, the set method of that property is not being called, where as the set methods of its sub properties are being...
0
by: Brian Young | last post by:
Hi all. I'm using the Property Grid control in a control to manage a windows service we have developed here. The windows service runs a set of other jobs that need to be managed. The control...
5
by: KitKat | last post by:
I've got two queries; one is a modification of an older query; the other I created from scratch. The old one is about 5 copies down the road from something that has been expandable when I'm in...
1
by: axlq | last post by:
I've seen a lot of examples of expandable/collapsable lists, such as these nice examples: http://www.karlnelson.net/nestedlists/ and http://dynamicdrive.com/dynamicindex1/navigate1.htm They...
1
by: Manil | last post by:
I usually have no problem with Firefox, but here is a rare instance of IE displaying a table with image slices correctly and Firefox adding space where I seemingly have none. Is there anything I can...
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: 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:
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.