473,396 Members | 1,995 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,396 software developers and data experts.

display:block and scrolling overflow width problem

Hi,

Im trying to learn CSS and putting a website in effect. Just getting
used to DIV's and SPAN's and using the proper formatting of H1 H2 H3 etc
to format HTML documents and using different stylesheets to control
formatting.

So far it's going pretty well, and Im just ripping up everything I knew
about tables and starting with DIV's. Though I seem to be having a hell
of a time working with padding and margins, then trying to realise if I
add a one pixel border, then a div I give a width of 150px to, will
actually be, 152px width including the border.

I dunno. Anyhow, i think what I have is a pretty good working model now.
Not the best, but not bad for a first attempt (seems CSS has an initial
shallow learning curve that anyone can pick up how to apply different
fonts, then an incredibly steep learning curve if you want to use it
properly).

Now Im just dumbfounded by the differences between IE and FireFox and I
was hoping maybe someone can help.

http://www.acutec.co.uk/test/s3/home.php

First of all, in Firefox, the menu on the left. Looks good. Doesn't use
JavaScript but if you click on say the About Us Link and drag to the
right, the content shifts.

I have had to do this, Im not quite sure what I did, but the roll overs
weren't working in Internet Explorer, only when the mouse was waved over
the link. I think it involved changing the width of the a element to 100%

Which then seemed to work, but the consequence, there was extra space
showing over the edge after the 175 width I had initially asked for on
the div container.

So I kind of fixed this momentarily with overflow:hidden; on the div,
but I didn't notice the scrolling until now.

Im looking for guidance and a fix if at all possible.

Any ideas?

Thanks
Simon
Feb 3 '06 #1
1 6339
Think I may have sussed it, but a more seasoned developers advice would
be much appreciated:

#menu>ul>li>a.itemon { /* ie win cannot correctly parse child selector
rule */
width:auto;
}

#menu>ul>li>a.item { /* ie win cannot correctly parse child selector rule */
width:auto;
}

#menu { /* take advantage of underscore hack bug to not show clipped
data in ie*/
_overflow:hidden;
}
The width settings should in theory reset the width of the links for
Firefox/Mozilla, I've removed the overflow:hidden from the #menu div and
applied it down here only fo IE. This seems to make both work...

Firefox:
Width:auto; overflow:visible;

IE:
width:100%; overflow:hidden;
Feb 3 '06 #2

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

Similar topics

7
by: Jeff Thies | last post by:
I'm trying to do a nav list using list items. Roughly this is putting links styled display: block and with a background color. In IE5 (windows, haven't tried Mac yet), adding the display:...
18
by: David Morris | last post by:
G'day. Is there a known "display:block;" problem in opera? In playing around trying to get some cross browser conformance, I either inadvertently or redundantly (depending on your perspective)...
7
by: Marc | last post by:
Hi everyone. I am having trouble with a stylesheet in mozilla. It is part of turning a list into a menu: #menu li{ margin: 0; display: inline; vertical-align: bottom;
6
by: Sandman | last post by:
I'm having some problem here... I have a javascript I've downloaded that goes through all PNG files and enables the transparency channel in them for IE5.5+ by converting them to SPAN layers with...
6
by: dee | last post by:
Here is a a list of my hyperlinks in my home page: <A class="theclass" href="Default.aspx">Home</A> <A class="theclass" href="Search.aspx">Search</A> <A class="theclass"...
2
by: ruby_bestcoder | last post by:
Hi Im having problem in firefox with display:none/block. I have essentially 3 li elements. In each element there are a few nested div:s. Clicking on one of the divs, makes another div to...
25
by: Dave | last post by:
Hello. In trying to get an anchor element to stylistically match an input or button element, I find that the button and input cannot be styled according to the 2.1 CSS spec. For example, I...
7
by: Janis | last post by:
I try to understand what could be the source of a problem with displaying and hiding rows of tables using display:block/none. I've read selfhtml but could not find any hint about that. Any...
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
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
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
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.