473,795 Members | 2,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1601
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***@access4l ess.net> wrote in message news:<10******* ******@corp.sup ernews.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.n et.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******@geoci ties.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***@access4l ess.net> wrote in message news:<10******* ******@corp.sup ernews.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:47 5px; 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(nam eOfDiv) {
var targetdiv=docum ent.getElementB yId('content_di v');
var divname=documen t.getElementByI d(nameOfDiv);
targetdiv.inner HTML=divname.in nerHTML;
targetdiv.style .visibility='vi sible';
}
</script>

4. related div css:

#weblogs,#entri es,#newsletters ,
#images,#files, #comments,#link s,#members,#des ign,#settings,# categories,#oth er
{
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
2267
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 padding. I checked a couple of other browsers and couldn't find any that implemented top and bottom padding for the <A> element, assuming I have done it correctly. #bar A {
2
2462
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 using v.6). The style is worded as follows: ..brands img {margin-left: 200px; padding: 10px;} It looks great on Netscape, but there's no padding on Explorer. What can I
12
6742
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"> <span>Abc</span> <span style="background: white; color: black; line-height: 3">Abc</span> <span>Abc</span> </div>
18
2967
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" rel="stylesheet" type="text/css"> <style type="text/css"> @import url(ie-styles.css); </style>
2
19188
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 stylesheet file: ..formContentTable
1
3170
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; margin-left: auto; margin-right: auto; padding-left: 5px;
3
3382
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" onclick="window.open('http://www..com/photos/xxx.jpg','height=xxx, width=xxx');return false" href="#">link text</a> This script works very well for my needs, however, in IE6, the resulting opened window has unnecessary padding on the top and left sides of the image, which pushes the image down and to the...
7
1025
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 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...
6
2844
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
9673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10443
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10216
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
10165
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,...
1
7543
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
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();...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.