473,796 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

floated layer pushes others out of the way

I have this seemingly simple problem that has proven somewhat harder to
solve than I'd expected. I've been grappling with this for quite a
while, so any help would be greatly appreciated.

Please have a look:

http://www.thinkdesign.com/amrev-css2/

I have 2 html pages and the stylesheet linked from there.

The problem is that even when I define a z-index for #sections, it still
pushes the other divs down, out of the way.

The page uses the following definition for the floated layer that seems
to be causing the problems:

In CSS

#sections {
float:right;
width:148px;
font-size:0.8em;
text-align:right;
background: #c69;
font-weight: bold;
margin: -23px 0 0 0;
padding: 3px;
}

In HTML I have:
<div id="wrap">
<div id="header">
...

</div>
<div id="nav">
<ul>
<li>
<a href="#">Option 1</a>
</li>
...
...
...
<li>»
<a href="#">Option 6</a>
</li>
</ul>
<div id="sections">
Content in float. <br />
Content in float. <br />
Content in float. <br />
</div>
</div>
<div id="sidebar">
<ul>
<li>
<a title="Register " href="main_page ">Register</a>
</li>
...
...
...
</div>
<div id="main">
<h1>Educators </h1> <h3>Teacher resources</h3>
</div>
<div id="footer">
</div>
</div>
Thanks again for your help!
Jul 20 '05 #1
2 2383
Ray Shah wrote:
I have this seemingly simple problem that has proven somewhat harder to
solve than I'd expected. I've been grappling with this for quite a
while, so any help would be greatly appreciated.

Please have a look:

http://www.thinkdesign.com/amrev-css2/

I have 2 html pages and the stylesheet linked from there.

The problem is that even when I define a z-index for #sections, it still
pushes the other divs down, out of the way.


If I put float:left into #nav, #sections no longer pushes the divs down.

Option10 is still covered up by sections, unless the #wrap is widened.
Making wrap wider makes an ugly gap between #sidebar and #main until you
change the float:right in main to float:left.

Then it looks like what you want.
Jul 20 '05 #2
Ray Shah <ra*****@aol.co m> wrote:
http://www.thinkdesign.com/amrev-css2/

I have 2 html pages and the stylesheet linked from there.
Links should be recognizable as links.

It's a bother having to unravel a complete design, your's wasn't to bad,
but you're likely to get more and better responses if you demonstrate
that you care about us not having to waste our time:
http://www.spartanicus.utvinternet.i...s_help_you.htm
The problem is that even when I define a z-index for #sections
Pardon?
, it still pushes the other divs down, out of the way.
Neither #sidebar nor #main should be floated.

Due to the CSS deficiencies of IE, floating unfortunately has become a
generic method to align in some peoples minds. This is unfortunate
because the floating mechanism is generally not properly understood, and
because CSS float rules are ridiculously complex all browsers have float
bugs.
The page uses the following definition for the floated layer that seems
to be causing the problems:
Don't propagate the Dreamweaver "layer" speak, it's nonsense.
In CSS


Don't post code to the group, an url is preferred.

Btw, Transitional is for legacy documents that cannot be updated, Strict
is the correct coding practice for newly authored or revised documents.

--
Spartanicus
Jul 20 '05 #3

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

Similar topics

2
2875
by: Ney André de Mello Zunino | last post by:
Hello. The issue is quite known: you have a block-level container holding a set of floated elements and you need that the container's content height take the floated elements' dimensions into consideration. E.g.: <div class="images"> <div class="image"><img src="example1.png" width="160" height="120" alt=""></div> <div class="image"><img src="example2.png" width="160" height="120"
0
1853
by: Mike Kozlowski | last post by:
I have a div floated left for a navbar, with another div in the normal flow for content, like so: #leftnav { float: left; width: 120px; } #content { margin-left: 170px; margin-right: 10px;} What I'd like is for my left nav to always stay in a fixed size and position, and my content to size dynamically to fit the window. This mostly works for that, except that if the content contains a table wider than the content div, the table gets...
26
3776
by: puzzled | last post by:
Okay, so my subject sounds a bit crass. As much as I'd like to totally embrace css and avoid "deprecated" usage, sometimes the deprecated stuff is so much easier and more effective. Plus, it at least does what I want it to, while I'm left puzzled trying to make a css implementation do the same thing. Here is a simple example. I want to have four identical-sized images displayed in a two-by-two arrangement, wtih room for a centered...
2
2773
by: Wiz | last post by:
Greetings the group! I see from a few previous postings that I am not the only person having a problem with hidden list item bullets. This question applies to both IE 6, current version, and Firefox 0.8 browsers, which I am using for testing. I have a design in progress that uses a relatively positioned, left-floated, 122px wide navbar, with the main content padded to the right by 10px, wrapping under after it exceeds the height of the...
3
2859
by: Lee K. Seitz | last post by:
I'm redesigning this page for more up-to-date browser standards: <http://home.hiwaay.net/~lkseitz/hhs/winners.shtml>. Note the use of an "invisible" table to position the "visible" ones. I'm attempting to get a similar layout using CSS. So far the best I've come up with is <http://home.hiwaay.net/~lkseitz/hhs2/winners.shtml>. (CSS at <http://home.hiwaay.net/~lkseitz/hhs2/hhs.css>.) The problems (all Windows): 1. In IE 6 and NN 7,...
24
2890
by: Thomas Mlynarczyk | last post by:
Hi, Here's what I have: <div> <img ...><br> Caption text </div> The div is floated left and has no width set, the content is centered, there are no margins or padding on the <img> (just a bottom margin and
8
4814
by: deko | last post by:
Which layer should a Factory class go in? DA - Data Access BL - Business Logic UI - User Interface ??
16
9037
by: MS newsgroup | last post by:
I don't have clear reasons why we need business logic layer and data logic layer instead of having only data logic layer. Are there any good reasons for that?
14
1839
by: tezza | last post by:
I have a floated image and some paragraph text in a fluid box. It works beautifully, but only when the text extends beyond the image. Could someone take a look at my source please and tell me how I can 'fix' the second box. http://www.stayintheknow.info/index-test.html There's a slightly different outcome on FF and IE(7).
0
9685
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
9531
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
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
10237
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...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6795
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();...
0
5578
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
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.