473,396 Members | 1,927 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.

some random problems with this site

please take a look at:

shannon.amandadevries.com

1. in firefox, the 'content' div should be starting on the right-hand
side of the menublock, not all the way down at the 'copyrightblock'.
what gives?

2. why is 'container' not being centred in IE? i have a site that is
very similar to this in terms of it CSS, which is correctly centred...

3. why does the content in 'content' repeat itself below the
copyrightblock in IE?

Thanks,
Amanda
www.amandadevries.com

Apr 16 '07 #1
2 1962
On 2007-04-16, Amanda <am*******@gmail.comwrote:
please take a look at:

shannon.amandadevries.com

1. in firefox, the 'content' div should be starting on the right-hand
side of the menublock, not all the way down at the 'copyrightblock'.
what gives?
You've got menublock and copyright block first in the content, these are
both float: left and clear: left, so they stack up on the left one
underneath the other. So far so good. Then content, which is float:
right. The rule is that a float can never go higher than another float
that appears earlier in the document, so content cannot go higher than
copyright block.

Here is the rule, in section 9.5.1 of CSS 2.1:

The outer top [p. 100] of a floating box may not be higher than the
outer top of any block [p. 117] or floated [p. 130] box generated by an
element earlier in the source document.

That's why there's a gap above content. Fix it by moving copyrightblock
down in the HTML source so it's after content.

There's another problem here which you don't get on Firefox or Konqueror
but which you do get on Opera. menublock is width: auto and consists of
a series of left floats. Opera treats its "preferred width" as the sum
of the widths of all those floats, i.e. the width they would occupy if
they were all adjacent to one another horizontally, in spite of the fact
that each one has clear set on it and so could never actually be placed
horizontally adjacent to its predecessor.

The spec doesn't exactly say what to do in this situation-- it doesn't
say anything about how floats affect content minwidths and content
preferred widths, leaving that to the common sense of the implementor. I
think both Opera and Firefox are doing something reasonable here.

Anyway, this results, in Opera, in a computed width value for menublock
equal to the available width since the sum of the widths of the menu
floats inside is greater than the width of the viewport (for viewport
widths in a normal sort of range). This means the menu will always
appear above content, not to the right of it: not what you want.

Since you're setting the width of each menu item anyway to 125px, it is
easy to avoid this altogether just by setting the width of menublock
itself to 125px or so. That way, incidentally, each "menu" item doesn't
even need to be floated or cleared, they can just be normal block boxes
inside the menublock.
2. why is 'container' not being centred in IE? i have a site that is
very similar to this in terms of it CSS, which is correctly centred...

3. why does the content in 'content' repeat itself below the
copyrightblock in IE?
Can't help with your IE problems. You aren't using the strict DOCTYPE
though. Always start your document with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
Apr 16 '07 #2
On Apr 16, 5:15 pm, Ben C <spams...@spam.eggswrote:
On 2007-04-16, Amanda <amanda...@gmail.comwrote:
please take a look at:
shannon.amandadevries.com
1. in firefox, the 'content' div should be starting on the right-hand
side of the menublock, not all the way down at the 'copyrightblock'.
what gives?

You've got menublock and copyright block first in the content, these are
both float: left and clear: left, so they stack up on the left one
underneath the other. So far so good. Then content, which is float:
right. The rule is that a float can never go higher than another float
that appears earlier in the document, so content cannot go higher than
copyright block.

Here is the rule, in section 9.5.1 of CSS 2.1:

The outer top [p. 100] of a floating box may not be higher than the
outer top of any block [p. 117] or floated [p. 130] box generated by an
element earlier in the source document.

That's why there's a gap above content. Fix it by moving copyrightblock
down in the HTML source so it's after content.

There's another problem here which you don't get on Firefox or Konqueror
but which you do get on Opera. menublock is width: auto and consists of
a series of left floats. Opera treats its "preferred width" as the sum
of the widths of all those floats, i.e. the width they would occupy if
they were all adjacent to one another horizontally, in spite of the fact
that each one has clear set on it and so could never actually be placed
horizontally adjacent to its predecessor.

The spec doesn't exactly say what to do in this situation-- it doesn't
say anything about how floats affect content minwidths and content
preferred widths, leaving that to the common sense of the implementor. I
think both Opera and Firefox are doing something reasonable here.

Anyway, this results, in Opera, in a computed width value for menublock
equal to the available width since the sum of the widths of the menu
floats inside is greater than the width of the viewport (for viewport
widths in a normal sort of range). This means the menu will always
appear above content, not to the right of it: not what you want.

Since you're setting the width of each menu item anyway to 125px, it is
easy to avoid this altogether just by setting the width of menublock
itself to 125px or so. That way, incidentally, each "menu" item doesn't
even need to be floated or cleared, they can just be normal block boxes
inside the menublock.
2. why is 'container' not being centred in IE? i have a site that is
very similar to this in terms of it CSS, which is correctly centred...
3. why does the content in 'content' repeat itself below the
copyrightblock in IE?

Can't help with your IE problems. You aren't using the strict DOCTYPE
though. Always start your document with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

Ben,

Thank you; your message is very helpful!

Amanda

Apr 17 '07 #3

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

Similar topics

4
by: mescaline | last post by:
hi, i'm new to C++ could anyone refer me to a good site / good examples of random numbers? in particular including: 1) the commnds to obtain normally and exponenetially distributed r...
5
by: R. Russell Kinter | last post by:
Hi all, First of all I am fairly new to javascript. Most of my experience has been with its subset vrmlscript, so have mercy. The following script works in I.E. 5.5, but hangs up in Netscape 4.8...
1
by: crisox | last post by:
Hi can anyone explain why the web site I have created has problems loading its image files - i.e. images fail on a random basis. If I refresh a page on the site differnet images will fail each...
4
by: Marquisha | last post by:
If this is off-topic, please forgive me. But I thought this might be the perfect spot to get some advice about how to proceed with a project. Working on a Web site design for a nonprofit...
193
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I...
10
by: Curt_C [MVP] | last post by:
If I use it in my page it's fine but when I put it in a Class file for calling it returns the same # for each call. Any ideas why? I'm sure it's something I'll slap myself for but the only samples...
4
by: UMstudent | last post by:
I'm working on this program for class where I have to an amount of numbers that are randomly picked from 0 - 50. So what I have done is say there are 20 slots in my array so I'm trying to generator...
3
by: Amanda | last post by:
please take a look at: shannon.amandadevries.com 1. why is 'container' not being centred in IE? i have a site that is very similar to this in terms of it CSS, which is correctly centred... ...
3
by: Laphan | last post by:
Hi All I use a MySQL DB with my ASP classic web app. I've been asked if I can create a routine whereby I get a random number of products (records) from the DB and display these on the site. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.