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

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 2364
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.com> 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
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...
0
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;} ...
26
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...
2
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...
3
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...
24
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...
8
by: deko | last post by:
Which layer should a Factory class go in? DA - Data Access BL - Business Logic UI - User Interface ??
16
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
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...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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...
0
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,...

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.