473,382 Members | 1,204 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,382 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 23 '05 #1
7 1004
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 23 '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 23 '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 23 '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 23 '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 23 '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 23 '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 23 '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...
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...
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"...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: 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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
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...

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.