473,804 Members | 2,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Percentage Height not working

I am trying to adjust the window/table size of a website
(www.worklaw.co.za) which has made use of DIV tags with its settings
embedded in an CSS file.

The client wants its width and height to adjust according to dynamic
screen size, and I have been able to adjust the width to a percentage
value which works fine. But if I try do the same with the height it
shows some very strange results squashing the field to display about 3
lines.

The following is copied out of the css file:

.Content {position:relat ive;
left:70px;
height:388px;
width:90%;
top:15px;
overflow:auto;
scrollbar-arrow-color:navy
border-style:solid;
border-width:2px;
border-color:
black #E9E9E9 #E9E9E9 black;
padding:3;
}

I've changed the width to 90% as you can see, but that hasn't helped.
Any ideas why a percentage wouldn't work for height?

Brendon

Sep 30 '05
22 6979
Gérard Talbot <ne***********@ gtalbot.org> wrote:
padding:3
is equivalent to writing
padding:0


Incorrect, "padding:3" should be ignored.

--
Spartanicus
Oct 1 '05 #11
On Fri, 30 Sep 2005, Gérard Talbot wrote:
This parsing error on the declaration will make CSS compliant
browsers to ignore the declaration.

CSS1 Forward-compatible parsing
http://www.w3.org/TR/REC-CSS1#forwar...atible-parsing
CSS2.1 Rules for handling parsing errors
http://www.w3.org/TR/CSS21/syndata.html#parsing-errors
right...
So writing:

padding:3
is equivalent to writing
padding:0


No it isn't. In a conforming browser, it's equivalent to not
writing that padding specification at all - just as you cited.

So the padding will be set to whatever value comes out of the cascade,
disregarding this particular "declaratio n".
Oct 1 '05 #12
Spartanicus wrote in message news:ij******** *************** *********@news. spartanicus.utv internet.ie...
Gérard Talbot wrote:
padding:3
is equivalent to writing
padding:0


Incorrect, "padding:3" should be ignored.

as should "padding:0" ...
therefore "is equivalent" should be correct...

looking at the text and links you omitted by snipping:

<<
This parsing error on the declaration will make CSS compliant
browsers to ignore the declaration.

CSS1 Forward-compatible parsing
http://www.w3.org/TR/REC-CSS1#forwar...atible-parsing
CSS2.1 Rules for handling parsing errors
http://www.w3.org/TR/CSS21/syndata.html#parsing-errors

So writing:

padding:3
is equivalent to writing
padding:0

from http://www.w3.org/TR/CSS21/syndata.html#parsing-errors:

* Illegal values. User agents must ignore a declaration with an illegal value. For example:

img { float: left } /* correct CSS 2.1 */
img { float: left here } /* "here" is not a value of 'float' */
img { background: "red" } /* keywords cannot be quoted */
img { border-width: 3 } /* a unit must be specified for length values */

A CSS 2.1 parser would honor the first rule and ignore the rest, as if the style sheet had been:

img { float: left }
img { }
img { }
img { }

so as Gérard wrote, the following:

div { padding: 3 }
div { padding: 0 }

parses as:

div { }
div { }
which is equivalent.

Oct 1 '05 #13

"Alan J. Flavell" <fl*****@ph.gla .ac.uk> wrote in message news:Pi******** *************** ********@ppepc5 6.ph.gla.ac.uk. ..
On Fri, 30 Sep 2005, Gérard Talbot wrote:
This parsing error on the declaration will make CSS compliant
browsers to ignore the declaration.

CSS1 Forward-compatible parsing
http://www.w3.org/TR/REC-CSS1#forwar...atible-parsing
CSS2.1 Rules for handling parsing errors
http://www.w3.org/TR/CSS21/syndata.html#parsing-errors
right...
So writing:

padding:3
is equivalent to writing
padding:0


No it isn't. In a conforming browser, it's equivalent to not
writing that padding specification at all - just as you cited.


isn't it or is it?

somebody is confused: No it isn't [equivalent]. In a conforming browser, it's equivalent to not

^^^^^^^^^^^^^^^ ^^^^^^ as opposed to ^^^^^^^^^^^^^^^

please make up your mind, you're confusing others as well

Oct 1 '05 #14
On Sat, 01 Oct 2005 13:18:48 +0200, Robi <me@privacy.net > wrote:
"Alan J. Flavell" <fl*****@ph.gla .ac.uk> wrote in message
No it isn't. In a conforming browser, it's equivalent to not
writing that padding specification at all - just as you cited.


isn't it or is it?

somebody is confused:
No it isn't [equivalent]. In a conforming browser, it's equivalent to not

^^^^^^^^^^^^^^^ ^^^^^^ as opposed to ^^^^^^^^^^^^^^^

please make up your mind, you're confusing others as well


Learn to read.

Gérard: so it equals 'padding:0;' --> Alan: 'no it isn't'
Why? --> Because it is equivalent to _not_specifying _that_padding_a t_all.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Oct 1 '05 #15
On Sat, 01 Oct 2005 13:15:12 +0200, Robi <me@privacy.net > wrote:
Spartanicus wrote in message
news:ij******** *************** *********@news. spartanicus.utv internet.ie...
Gérard Talbot wrote:
padding:3
is equivalent to writing
padding:0
Incorrect, "padding:3" should be ignored.

as should "padding:0" ...


Wrong. If the default is (say) padding:.5em, and I don't want it, I can use
padding:0; to set the padding to, surprise, 0.
therefore "is equivalent" should be correct...


Cut the crap and learn to read.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Oct 1 '05 #16
Barbara de Zoete wrote:
Gérard: so it equals 'padding:0;' --> Alan: 'no it isn't'
Why? --> Because it is equivalent to _not_specifying _that_padding_a t_all.


Example:

p {
padding: 1em
}
p {
padding: 3
}

Result is:
p {
padding: 1em
}
(because the second rule will be ignored) and not
p {
padding: 0
}
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Oct 1 '05 #17
On Sat, 1 Oct 2005, Barbara de Zoete wrote:
On Sat, 01 Oct 2005 13:15:12 +0200, Robi <me@privacy.net > wrote:
therefore "is equivalent" should be correct...


Cut the crap and learn to read.


I suspect our would-be informant might be muddled about the difference
between, on the one hand:

padding: 3;

which is invalid (missing its units specification) and required to be
ignored in its entirety (i.e *not* treated as a specification of
zero!), and, on the other hand:

padding: 0;

which is legal (a value of 0 is allowed, even without a unit - since 0
is 0 in any units) and so should not be ignored.
Be that as it may, "Robi" is well on their way to establishing
eligibility for at least one killfile around here :-}

regards
Oct 1 '05 #18
On Sat, 1 Oct 2005 06:18:48 -0500, Robi wrote:
somebody is confused:
No it isn't [equivalent]. In a conforming browser, it's equivalent to not ^^^^^^^^^^^^^^^ ^^^^^^ as opposed to ^^^^^^^^^^^^^^^

Don't quote only the bits that you like, the full quote is: No it isn't. In a conforming browser, it's equivalent to not
writing that padding specification at all - just as you cited.
which has a completely different meaning to what you quoted.
please make up your mind, you're confusing others as well


No, I would say that you are confusing people by obfuscating the issue.
Oct 1 '05 #19
Alan J. Flavell wrote in message news:Pi******** *************** *******@ppepc56 .ph.gla.ac.uk.. .
On Sat, 1 Oct 2005, Barbara de Zoete wrote:
On Sat, 01 Oct 2005 13:15:12 +0200, Robi wrote:
therefore "is equivalent" should be correct...
Cut the crap and learn to read.


I suspect our would-be informant might be muddled about the difference
between, on the one hand:

padding: 3;

which is invalid (missing its units specification) and required to be
ignored in its entirety (i.e *not* treated as a specification of
zero!), and, on the other hand:

padding: 0;

which is legal (a value of 0 is allowed, even without a unit - since 0
is 0 in any units) and so should not be ignored.


please excuse my ignorance. I was indeed taking the lack of units as the
same invalid statement, which, if I may add, nobody actually cared to
point out as you did.
Be that as it may, "Robi" is well on their way to establishing
eligibility for at least one killfile around here :-}


I don't care how many "Robi is an idiot" or "Robi got no clue" posts
I get, as long as people can learn from misconceptions.

Yes, I had no clue, and if that is good for you to KF me, go ahead :)

Though now I believe to know something more, and I also understand
the reason behind it. Thanks for educating me.
Oct 1 '05 #20

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

Similar topics

8
7420
by: Vic | last post by:
I've managed to achieve the effect I wanted in IE6 - although I had to use an experession to set the vertical height of a div (I want it to have an overflow and scroll) but I can't work out a way to duplicate the effect in Mozilla/Firefox the code is here: http://www.fogcat.co.uk/example/example.html Can anyone point me in the right direction - or at least tell me if it is or isn't possible to get the same functionality in Firefox
3
8837
by: Les Juby | last post by:
I am trying to adjust the window/table size of a website (www.worklaw.co.za) which has made use of DIV tags with its settings embedded in an CSS file. The client wants its width and height to adjust according to dynamic screen size, and I have been able to adjust the width to a percentage value which works fine. But if I try do the same with the height it shows some very strange results squashing the field to display about 3 lines.
11
8089
by: sariset | last post by:
here is a sample of my problem <table style="width:100%;height:100%"> <tr style="height: 60%"> <td style="width: 968px"> <div style="height: 100%;overflow:scroll;"> <div style="height: 100px;" > content </div> <div style="height: 100px" >
0
9572
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
10319
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10303
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
10070
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
9132
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...
0
6845
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5508
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
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.