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

possible

Hello,

intro:

..full { width: 100px }

..half { width: 50 px }

Is it now somehow possible to change the definition of the class half in a
way that its width depends on the width of the class full?

I am just wondering if that is possible.

Best Regards,

Oliver

May 6 '06 #1
5 1285
Oliver Block wrote:
Hello,

intro:

.full { width: 100px }

.half { width: 50 px }

Is it now somehow possible to change the definition of the class half in a
way that its width depends on the width of the class full?

I am just wondering if that is possible.


If you enclose the block level element inside a "frame" then you can
make the widths relative to the size of the frame. You can then give
the frame an absolute width. It would achieve the same effect.

An example:

[...]

<style type="text/css">
..frame {width:100px;}
..full {width:100%;}
..half {width:50%;}
</style>
</head>

<body>

<div class="frame">
<div class="full"></div>
<div class="half"></div>
</div>

[...]
--
ironcorona
May 7 '06 #2
Oliver Block wrote:

intro:
.full { width: 100px }
.half { width: 50 px }

Is it now somehow possible to change the definition of the class half in a
way that its width depends on the width of the class full?

Rather than a frame, set the width of .half to a percentage and put it
inside of .full.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
May 7 '06 #3
Jim Moe wrote:
Oliver Block wrote:
intro:
.full { width: 100px }
.half { width: 50 px }

Is it now somehow possible to change the definition of the class half in a
way that its width depends on the width of the class full?

Rather than a frame, set the width of .half to a percentage and put it
inside of .full.


*smacks forehead* But of course!

--
ironcorona
May 7 '06 #4
Hi,
Jim Moe wrote:
Oliver Block wrote:

intro:
.full { width: 100px }
.half { width: 50 px }

Is it now somehow possible to change the definition of the class half in
a way that its width depends on the width of the class full?

Rather than a frame, set the width of .half to a percentage and put it
inside of .full.


And if .half is a sibling of .full?

Best Regards,

Oliver
May 8 '06 #5
Oliver Block wrote:

intro:
.full { width: 100px }
.half { width: 50 px }

Is it now somehow possible to change the definition of the class half in
a way that its width depends on the width of the class full?

Rather than a frame, set the width of .half to a percentage and put it
inside of .full.


And if .half is a sibling of .full?

You need another div to contain .full and .half. Use a percentage for
..full and set .half's width to half of .full's width.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
May 8 '06 #6

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

Similar topics

4
by: Julia Briggs | last post by:
I am struggling to create a PHP function that would take a specified image (JPG, GIF or PNG) from a link, and resize it down to a thumbnail so it will always fit in a 200x250 space. I am hoping...
36
by: rbt | last post by:
Say I have a list that has 3 letters in it: I want to print all the possible 4 digit combinations of those 3 letters: 4^3 = 64 aaaa
20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
7
by: Andrzej | last post by:
Is it possible to call a function which name is given by a string? Let assume that I created a program which call some functions for example void f1(void), void f2(void), void f3(void). ...
2
by: Bhupesh Naik | last post by:
This is a query regarding my problem to make a spell and grammar check possible in text area of a web page. We have aspx pages which are used to construct letters. The browser based screens...
1
by: AAA | last post by:
hi, I'll explain fastly the program that i'm doing.. the computer asks me to enter the cardinal of a set X ( called "dimX" type integer)where X is a table of one dimension and then to fill it...
25
by: Piotr Nowak | last post by:
Hi, Say i have a server process which listens for some changes in database. When a change occurs i want to refresh my page in browser by notyfinig it. I do not want to refresh my page i.e....
4
by: RSH | last post by:
Okay my math skills aren't waht they used to be... With that being said what Im trying to do is create a matrix that given x number of columns, and y number of possible values i want to generate...
7
by: Robert S. | last post by:
Searching some time now for documents on this but still did not find anything about it: Is it possible to replace the entry screen of MS Office Access 2007 - that one presenting that default...
14
by: bjorklund.emil | last post by:
Hello pythonistas. I'm a newbie to pretty much both programming and Python. I have a task that involves writing a test script for every possible combination of preference settings for a software...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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.