473,403 Members | 2,359 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,403 software developers and data experts.

Not sure what is happening here

When I write a simple height or width CSS for a tag using percentage it
seems to give unreliable results.

..BannerPurple
{
background-color: #660066;
height: 60%;
width: 50%;
}

on IE the height and width are not modifiied yet the background-color is. On
Firefox and NN the height and width are modified.

When I use

..BannerGreen
{
background-color: #004401;
height: 50px;
width: 2340px;
}

the height and width are modified on both browsers. I have been reading all
over the web but have not found what I am doing incorrectly. Oh I "have"
tried setting position but still have mixed results.

Would someone please tell me what it is I am doing incorrectly?

Thanks

--

Totus possum, totum Deum.
Totus ero, totum meum.
WSW
Apr 20 '06 #1
6 1256
To further the education of mankind, "News"
<warren@no_S_P_A_M_wyght.com> vouchsafed:
When I write a simple height or width CSS for a tag using percentage
it seems to give unreliable results.

.BannerPurple
{
background-color: #660066;
height: 60%;
width: 50%;
}

on IE the height and width are not modifiied yet the background-color
is. On Firefox and NN the height and width are modified.

When I use

.BannerGreen
{
background-color: #004401;
height: 50px;
width: 2340px;
}

the height and width are modified on both browsers. I have been
reading all over the web but have not found what I am doing
incorrectly. Oh I "have" tried setting position but still have mixed
results.

Would someone please tell me what it is I am doing incorrectly?


Kind of hard to say with just those snippets. A url might facilitate
assistance.

--
Neredbojias
Infinity has its limits.
Apr 20 '06 #2
Neredbojias wrote:
To further the education of mankind, "News"
<warren@no_S_P_A_M_wyght.com> vouchsafed:
When I write a simple height or width CSS for a tag using percentage
it seems to give unreliable results.

.BannerPurple
{
background-color: #660066;
height: 60%;
width: 50%;
}

on IE the height and width are not modifiied yet the background-color
is. On Firefox and NN the height and width are modified.

When I use

.BannerGreen
{
background-color: #004401;
height: 50px;
width: 2340px;
}

the height and width are modified on both browsers. I have been
reading all over the web but have not found what I am doing
incorrectly. Oh I "have" tried setting position but still have mixed
results.

Would someone please tell me what it is I am doing incorrectly?


Kind of hard to say with just those snippets. A url might facilitate
assistance.


Here is the css file
http://www.wyght.com/htdocs/warren/testBanner.css

Here is the URL
http://www.wyght.com/warren/ieTMbanner.html

The height does not seem to be working at all, where as sometimes the width
seems to be working when I use percentage
--

Totus possum, totum Deum.
Totus ero, totum meum.
WSW
Apr 20 '06 #3
To further the education of mankind, "News"
<warren@no_S_P_A_M_wyght.com> vouchsafed:

.....
the height and width are modified on both browsers. I have been
reading all over the web but have not found what I am doing
incorrectly. Oh I "have" tried setting position but still have mixed
results.

Would someone please tell me what it is I am doing incorrectly?


Kind of hard to say with just those snippets. A url might facilitate
assistance.


Here is the css file
http://www.wyght.com/htdocs/warren/testBanner.css

Here is the URL
http://www.wyght.com/warren/ieTMbanner.html

The height does not seem to be working at all, where as sometimes the
width seems to be working when I use percentage


This will have other reprecussions for the page, but put the following in
the css:

html,body { height:100%; }

This gives the divs a reference which is needed in today's css.

--
Neredbojias
Infinity has its limits.
Apr 20 '06 #4
Neredbojias wrote:
To further the education of mankind, "News"
<warren@no_S_P_A_M_wyght.com> vouchsafed:

....
the height and width are modified on both browsers. I have been
reading all over the web but have not found what I am doing
incorrectly. Oh I "have" tried setting position but still have
mixed results.

Would someone please tell me what it is I am doing incorrectly?

Kind of hard to say with just those snippets. A url might
facilitate assistance.


Here is the css file
http://www.wyght.com/htdocs/warren/testBanner.css

Here is the URL
http://www.wyght.com/warren/ieTMbanner.html

The height does not seem to be working at all, where as sometimes the
width seems to be working when I use percentage


This will have other reprecussions for the page, but put the
following in the css:

html,body { height:100%; }

This gives the divs a reference which is needed in today's css.


Well that seems to work fine in IE but not in NN or FireFox

What I did for NN, FF and Opera was put in position: absolute;

From what I know that is not always the best either, but what is the
negitive side effect of having body{height: 100%}?

Thanks for your help
--

Totus possum, totum Deum.
Totus ero, totum meum.
WSW
Apr 20 '06 #5
To further the education of mankind, "News" <warren@no_S_P_A_M_wyght.com>
vouchsafed:
Neredbojias wrote:
To further the education of mankind, "News"
<warren@no_S_P_A_M_wyght.com> vouchsafed:

....
> the height and width are modified on both browsers. I have been
> reading all over the web but have not found what I am doing
> incorrectly. Oh I "have" tried setting position but still have
> mixed results.
>
> Would someone please tell me what it is I am doing incorrectly?

Kind of hard to say with just those snippets. A url might
facilitate assistance.

Here is the css file
http://www.wyght.com/htdocs/warren/testBanner.css

Here is the URL
http://www.wyght.com/warren/ieTMbanner.html

The height does not seem to be working at all, where as sometimes the
width seems to be working when I use percentage
This will have other reprecussions for the page, but put the
following in the css:

html,body { height:100%; }

This gives the divs a reference which is needed in today's css.


Well that seems to work fine in IE but not in NN or FireFox


Strange. I checked it in Firefox. Oh, well...
What I did for NN, FF and Opera was put in position: absolute;
That may be the best solution. -And IE6 doesn't "do" position:fixed,
anyway.
From what I know that is not always the best either, but what is the
negitive side effect of having body{height: 100%}?


I use it when trying to vertically-center small content, and that, along
with other related css, can cause all kinds of anomalous havoc in various
browsers.

--
Neredbojias
Infinity has its limits.
Apr 20 '06 #6
Neredbojias wrote:
To further the education of mankind, "News"
<warren@no_S_P_A_M_wyght.com> vouchsafed:
Neredbojias wrote:
To further the education of mankind, "News"
<warren@no_S_P_A_M_wyght.com> vouchsafed:

....
>> the height and width are modified on both browsers. I have been
>> reading all over the web but have not found what I am doing
>> incorrectly. Oh I "have" tried setting position but still have
>> mixed results.
>>
>> Would someone please tell me what it is I am doing incorrectly?
>
> Kind of hard to say with just those snippets. A url might
> facilitate assistance.

Here is the css file
http://www.wyght.com/htdocs/warren/testBanner.css

Here is the URL
http://www.wyght.com/warren/ieTMbanner.html

The height does not seem to be working at all, where as sometimes
the width seems to be working when I use percentage

This will have other reprecussions for the page, but put the
following in the css:

html,body { height:100%; }

This gives the divs a reference which is needed in today's css.


Well that seems to work fine in IE but not in NN or FireFox


Strange. I checked it in Firefox. Oh, well...
What I did for NN, FF and Opera was put in position: absolute;


That may be the best solution. -And IE6 doesn't "do" position:fixed,
anyway.
From what I know that is not always the best either, but what is the
negitive side effect of having body{height: 100%}?


I use it when trying to vertically-center small content, and that,
along with other related css, can cause all kinds of anomalous havoc
in various browsers.


Thanks for your help in this, what I chose to do was make a img banner and
place that in a <div class="container"> which enables me to place it have
the width and height as I want them to be.

--

Totus possum, totum Deum.
Totus ero, totum meum.
WSW
Apr 22 '06 #7

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

Similar topics

9
by: Mike MacSween | last post by:
The back end is on a server. Compact on close is set on, but on the clients server isn't happening, though no errors are being generated. On my machine here Compact On Close happens fine. Is...
1
by: bbdata | last post by:
strange thing happened when i split my database. i have a search form where you enter parameters, and get back filtered records displayed on another form. when you close this one, theres a code in...
6
by: Andrew Mueller | last post by:
Hello all, There is a message below 'Application Error... When querying data'. What appears to be happening is that when I perform a lot of queries in a row and bring back the information into...
2
by: Barry Mossman | last post by:
Hi, What is required to unwire an event ? I wire it with: this.MyEvent += new MyEventHandler() Do I need to maintain a handle to the eventhandler created so that I can detach it ? The...
14
by: Paul | last post by:
Hi I have 2 functions in java script, one opens a second window-this works, the other is supposed to close this second window, does not seem to be working. Just wondering if anyone had any ideas....
2
by: zeyais | last post by:
Here is my HTML: <style> ..leftcolumn{float:left;width:300px;border: 1px solid #ccc} ..rtcolumn{float:left;width:600px;border: 1px solid #ccc} </style> <body> <div class="leftcolumn"...
1
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i'm trying to debug my ajax application and getting a timeout after about a minute and can't figure out why or where this timeout is occurring? here's the message:...
1
by: Adrian20XX | last post by:
Hi, I don't understand why the first C (c, not c++) program compiles and the second one does not compile. Any idea what is happening with the macro pre-processor in here, why StateStart(0) can...
2
by: sarandnl08 | last post by:
Hi all, I can't find any problem in this program, i getting empty string as output, why? what happening here any one help? int main() { char *p1=“name”; char *p2; ...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...

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.