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

padding sets to 0 in Netscape 7.1 but not in IE

I'm not sure if this is a style sheet issue or a Javascript issue.

I'm trying to work out a new design for my software's control panel.
The idea is that there are images on the left that you click and that
as you do, DIVs with option links appear and disappear on the right.
Because I want each of the DIVS to appear in the same place, I use
Javascript to set their padding and their height to 0px when they are
invisible. This is working the way I wish in Netscape 7.1 but it is
not working the way I want in IE. Can anyone give me a hint about why?
Go here:

http://publicdomainsoftware.org/desi...ntrolPanel.php
You'll need a username and password to get in, please use these
values:

username: designer
password: designer123
Jul 20 '05 #1
7 1582
lawrence wrote:
I'm not sure if this is a style sheet issue or a Javascript issue.

I'm trying to work out a new design for my software's control panel.
The idea is that there are images on the left that you click and that
as you do, DIVs with option links appear and disappear on the right.
Because I want each of the DIVS to appear in the same place, I use
Javascript to set their padding and their height to 0px when they are
invisible. This is working the way I wish in Netscape 7.1 but it is
not working the way I want in IE. Can anyone give me a hint about why?


Did you try not setting the height to 0, and using absolute positioning?
That works in my ie6, netscape7.2, firefox 0.9.
Jul 20 '05 #2
mscir wrote:

Did you try not setting the height to 0, and using absolute positioning?
That works in my ie6, netscape7.2, firefox 0.9.


He can also try using display: none/'' instead of visibility:
hidden/visible.

When elements are not displayed (display: none) they take up zero space
in the page. Using absolute position 0 inside another relatively
positioned div also locks their position.

Cheers, Fred.
Jul 20 '05 #3
mscir <ms***@access4less.net> wrote in message news:<10*************@corp.supernews.com>...
lawrence wrote:
I'm not sure if this is a style sheet issue or a Javascript issue.

I'm trying to work out a new design for my software's control panel.
The idea is that there are images on the left that you click and that
as you do, DIVs with option links appear and disappear on the right.
Because I want each of the DIVS to appear in the same place, I use
Javascript to set their padding and their height to 0px when they are
invisible. This is working the way I wish in Netscape 7.1 but it is
not working the way I want in IE. Can anyone give me a hint about why?


Did you try not setting the height to 0, and using absolute positioning?
That works in my ie6, netscape7.2, firefox 0.9.


Yes, absolute positioning would work, but it's inflexible. When we
asked our users what they liked and hated about early versions of the
software, one complaint was that everything was stuck on the left side
of the screen. So we decided to center the controls. We keep the width
to under 800 pixels because 50% of internet users have computers that
won't go beyond 800 pixels. But we've centered it and now it floats in
the center. Absolute positioning would take us back to our original
design.
Jul 20 '05 #4
Fred Oz <oz****@iinet.net.au> wrote in message news:<41***********************@per-qv1-newsreader-01.iinet.net.au>...
mscir wrote:

Did you try not setting the height to 0, and using absolute positioning?
That works in my ie6, netscape7.2, firefox 0.9.


He can also try using display: none/'' instead of visibility:
hidden/visible.

When elements are not displayed (display: none) they take up zero space
in the page. Using absolute position 0 inside another relatively
positioned div also locks their position.


Hot tip! And this will work for both IE and Netscape and FireFox, and
all the others?
Jul 20 '05 #5
On 1 Oct 2004 00:47:19 -0700, lawrence <lk******@geocities.com> wrote:

[snip]
Hot tip! And this [using the display property] will work for both IE and
Netscape and FireFox, and all the others?


All browsers that support CSS 1 and setting the display property, yes.
That excludes NN4[1] (if you care).

Mike
[1] NN4 uses the visibility property, but in a non-standard way. It would
also require layers or absolutely positioned DIVs.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 20 '05 #6
mscir <ms***@access4less.net> wrote in message news:<10*************@corp.supernews.com>...
lawrence wrote:
I'm not sure if this is a style sheet issue or a Javascript issue.

I'm trying to work out a new design for my software's control panel.
The idea is that there are images on the left that you click and that
as you do, DIVs with option links appear and disappear on the right.
Because I want each of the DIVS to appear in the same place, I use
Javascript to set their padding and their height to 0px when they are
invisible. This is working the way I wish in Netscape 7.1 but it is
not working the way I want in IE. Can anyone give me a hint about why?


Did you try not setting the height to 0, and using absolute positioning?
That works in my ie6, netscape7.2, firefox 0.9.


For various reasons I can't use absolute positioning. I need to keep
the design flexible. I need to find a way to make the design work in
IE with normal flow.
Jul 20 '05 #7
lawrence wrote:
<snip?
For various reasons I can't use absolute positioning. I need to keep
the design flexible. I need to find a way to make the design work in
IE with normal flow.


How about this approach, works on my IE 6, Netscape 7.2:

1. create a new div, insert it immediately after the "options div" and
before the unnamed no-id'd div.

</div> <!-- options -->
<div id="content_div"></div>
<div style="width:475px; float:right;"> <!-- un-named no-id'd div -->

2. content_div css:

#content_div {
background-color: #ffffff;
float: right;
padding: 0px;
width: 475px;
position: relative;
margin-left: 50px; /* adjust horiz position */
margin-top: 50px; /* adjust vert position */
visibility: hidden;
}

3. use this function to copy the content you want into it and make it
visible:

function makeVisible(nameOfDiv) {
var targetdiv=document.getElementById('content_div');
var divname=document.getElementById(nameOfDiv);
targetdiv.innerHTML=divname.innerHTML;
targetdiv.style.visibility='visible';
}
</script>

4. related div css:

#weblogs,#entries,#newsletters,
#images,#files,#comments,#links,#members,#design,# settings,#categories,#other
{
position: relative;
visibility: hidden;
background-color: #ffffff;
padding: 8px;
width: 475px;
}

Will that work for you?
Mike
Jul 20 '05 #8

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

Similar topics

15
by: Eric | last post by:
According to my book, the padding property is defined for all elements. However, when I set the property for the element <A>, only the left the right padding is applied and not the top and bottom...
2
by: AGChandler | last post by:
Hi, I have a div (class = "brands") containing other divs, each of which contains an image. I'm trying to set padding around the images, and my style seems to work okay on all but Explorer (I'm...
12
by: Stanimir Stamenkov | last post by:
Here are two cases regarding inline-level elements' line-height, padding and background, which I doesn't understand: <div style="background: black; color: white; line-height: 1.5">...
18
by: Toronto Web Designer | last post by:
I'm having trouble with the padding and margin properties. IE tends to be happier with the padding and Netscape with the margin property. So I tried this: <link href="netscape-styles.css"...
2
by: Knoxy | last post by:
Hello, I've noticed one or two people post on this before but nobody seems to have replied so raising the issue again... is this a known IE6 CSS bug? I have placed the following in my...
1
by: | last post by:
Hi there, the following works perfectly in Opera and Netscape, but not IE. Is this a known problem? I have a table defined with the following definition: table { margin-top: 30px;...
3
by: Becky Carter Hickman-Jones | last post by:
Hi, I have a simple script that opens an image in a new window which is sized to the image. The script is as follows: <a title="xxx"...
7
by: lawrence | last post by:
I'm not sure if this is a style sheet issue or a Javascript issue. I'm trying to work out a new design for my software's control panel. The idea is that there are images on the left that you...
6
by: John Messenger | last post by:
I notice that the C standard allows padding bits in both unsigned and signed integer types. Does anyone know of any real-world examples of compilers that use padding bits? -- John
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.