472,110 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 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 1210
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Mike MacSween | last post: by
6 posts views Thread by Andrew Mueller | last post: by
2 posts views Thread by Barry Mossman | last post: by
1 post views Thread by =?Utf-8?B?cm9kY2hhcg==?= | last post: by

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.