473,774 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

four divs on one page?


I need to lay out a page with five main elements: A fixed div at the top
containing a navigation bar, two side-by-side columns, a centered shopping
cart at the bottom, and a full-window fixed div to provide a border. A
test page is at

http://www.marcvonem.com/discography.html

The navigation bar and absolutely positioned side by side columns look
fine (with a few cosmetic problems that will be dealt with later) but I
cannot figure out how to place the shopping cart under the two columns
(not at the bottom of the window, at the bottom of the page regardless of
the length of the page, which hopefully will grow as they release more
records!)

Any hints?

Pierre
--
Pierre Jelenc | New on Home Office Records: Ethan Lipton
| www.homeofficerecords.com www.ethanlipton.com
The Gigometer | Pepper Of The Earth: the HO blog
www.gigometer.com | www.homeofficerecords.com/blog
Jul 20 '05 #1
16 2309
Ivo
"Pierre Jelenc" <rc**@panix.com > wrote in message
news:c1******** **@reader2.pani x.com...

I need to lay out a page with five main elements: A fixed div at the top
containing a navigation bar, two side-by-side columns, a centered shopping
cart at the bottom, and a full-window fixed div to provide a border. A
test page is at

http://www.marcvonem.com/discography.html

The navigation bar and absolutely positioned side by side columns look
fine (with a few cosmetic problems that will be dealt with later) but I
cannot figure out how to place the shopping cart under the two columns
(not at the bottom of the window, at the bottom of the page regardless of
the length of the page, which hopefully will grow as they release more
records!)

Any hints?

Pierre


The main content is not taking up space because it is absolutely positioned.
That is why the cart div is not low enough. Perhaps place it inside the main
div, or alter the main to be relative. If you knew the height of your
content, you could offset it with that amount, but you don't want to know
the height because as you say, that should grow.
HTH
Ivo
Jul 20 '05 #2
rc**@panix.com (Pierre Jelenc) wrote:
I need to lay out a page with five main elements: A fixed div at the top
containing a navigation bar, two side-by-side columns, a centered shopping
cart at the bottom, and a full-window fixed div to provide a border. A
test page is at

http://www.marcvonem.com/discography.html

The navigation bar and absolutely positioned side by side columns look
fine (with a few cosmetic problems that will be dealt with later) but I
cannot figure out how to place the shopping cart under the two columns
(not at the bottom of the window, at the bottom of the page regardless of
the length of the page, which hopefully will grow as they release more
records!)


Get rid of that absolute positioning.

#discoleft {float: left;}
#discoright {float: right;}
form {clear: both;}

Easy one.

--
Karl Smith.
Interim President,
International Global World "Jonathon Frakes
must never work in films again!" Society
Jul 20 '05 #3
Karl Smith go************@ kjsmith.com wrote:
rc**@panix.com (Pierre Jelenc) wrote:
I need to lay out a page with five main elements: A fixed div at the top
containing a navigation bar, two side-by-side columns, a centered shopping
cart at the bottom, and a full-window fixed div to provide a border. A
test page is at

http://www.marcvonem.com/discography.html

The navigation bar and absolutely positioned side by side columns look
fine (with a few cosmetic problems that will be dealt with later) but I
cannot figure out how to place the shopping cart under the two columns
(not at the bottom of the window, at the bottom of the page regardless of
the length of the page, which hopefully will grow as they release more
records!)


Get rid of that absolute positioning.

#discoleft {float: left;}
#discoright {float: right;}
form {clear: both;}

Easy one.


in general it seems best to start by using relative positioning, and only
go to absolute positioning if the design requires it...a lot of people
seem to work the other way around and I'm not entirely sure why...what am
I missing?

--
eric
www.ericjarvis.co.uk
all these years I've waited for the revolution
and all we end up getting is spin
Jul 20 '05 #4
On Sat, 28 Feb 2004 03:43:27 -0000, Eric Jarvis <we*@ericjarvis .co.uk>
wrote:
in general it seems best to start by using relative positioning, and only
go to absolute positioning if the design requires it...a lot of people
seem to work the other way around and I'm not entirely sure why...what am
I missing?

Well, for one I don't fully agree. Floating and absolute positioning each
have their uses, and one cannot do half of what the other does. Rather
than avoid one and use the other, you need to consider which is right for
doing what you want.

And relative positioning hasn't shown itself to be useful to me in page
layout with the exception of setting an otherwise static div as positioned
without even moving it. I can't think of a layout situation where relative
positioning would really be used... ideas?
Jul 20 '05 #5
Neal ne*****@spamrcn .com wrote:
On Sat, 28 Feb 2004 03:43:27 -0000, Eric Jarvis <we*@ericjarvis .co.uk>
wrote:
in general it seems best to start by using relative positioning, and only
go to absolute positioning if the design requires it...a lot of people
seem to work the other way around and I'm not entirely sure why...what am
I missing?
Well, for one I don't fully agree. Floating and absolute positioning each
have their uses, and one cannot do half of what the other does. Rather
than avoid one and use the other, you need to consider which is right for
doing what you want.


That's absolutely true. However there's still the question of which to try
first when either will work.
And relative positioning hasn't shown itself to be useful to me in page
layout with the exception of setting an otherwise static div as positioned
without even moving it. I can't think of a layout situation where relative
positioning would really be used... ideas?


The post I was replying to was an example where absolute positioning
failed when relative positioning worked. I very rarely find any need for
absolute positioning.

--
eric
www.ericjarvis.co.uk
"live fast, die only if strictly necessary"
Jul 20 '05 #6
On Sat, 28 Feb 2004 14:08:20 -0000, Eric Jarvis <we*@ericjarvis .co.uk>
wrote:


The post I was replying to was an example where absolute positioning
failed when relative positioning worked. I very rarely find any need for
absolute positioning.

No, Karl used floating. That's quite different from relative positioning.
Jul 20 '05 #7
Karl Smith <go************ @kjsmith.com> writes:
Get rid of that absolute positioning.

#discoleft {float: left;}
#discoright {float: right;}
form {clear: both;}


Thanks, that works but there's something weird. Even though the page still
validates (both HTML and CSS) the links in the main part are all dead:

http://www.marcvonem.com/discography.html

"CD Baby" under each image and in the shopping cart should be links to
various pages on www.cdbaby.com. With Mozilla 1.6 the links are inactive
(no change while hovering, and nothing happens on clicking) even though
they are listed as links in the page info. With older browsers that mess
up the CSS the links are OK, and so are they in text-mode browsers.

The links in the navigation bar at the top are OK everywhere.

Pierre
--
Pierre Jelenc | New on Home Office Records: Ethan Lipton
| www.homeofficerecords.com www.ethanlipton.com
The Gigometer | Pepper Of The Earth: the HO blog
www.gigometer.com | www.homeofficerecords.com/blog
Jul 20 '05 #8
rc**@panix.com (Pierre Jelenc) wrote:
Karl Smith <go************ @kjsmith.com> writes:
Get rid of that absolute positioning.

#discoleft {float: left;}
#discoright {float: right;}
form {clear: both;}
Thanks, that works but there's something weird. Even though the page still
validates (both HTML and CSS) the links in the main part are all dead:

http://www.marcvonem.com/discography.html

"CD Baby" under each image and in the shopping cart should be links to
various pages on www.cdbaby.com. With Mozilla 1.6 the links are inactive
(no change while hovering, and nothing happens on clicking) even though
they are listed as links in the page info. With older browsers that mess
up the CSS the links are OK, and so are they in text-mode browsers.


As soon as I removed position: fixed; from the #mainbox the links
reactivated.
The links in the navigation bar at the top are OK everywhere.

Pierre

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #9
rc**@panix.com (Pierre Jelenc) wrote:
Karl Smith <go************ @kjsmith.com> writes:
Get rid of that absolute positioning.

#discoleft {float: left;}
#discoright {float: right;}
form {clear: both;}


Thanks, that works but there's something weird. Even though the page still
validates (both HTML and CSS) the links in the main part are all dead:

http://www.marcvonem.com/discography.html

The links in the navigation bar at the top are OK everywhere.


That's a z-index issue - when links don't work it means they're
"behind" some transparent element with a higher z-index. Check
anything you've absolutely positioned, something is probably a lot
bigger than you intend.

E.g., that menu at the top should have "position: absolute", z-index,
top, width, and height - but *not* left, right, or bottom -
properties set.

--
Karl Smith.
Interim President,
International Global World "Jonathon Frakes
must never work in films again!" Society
Jul 20 '05 #10

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

Similar topics

2
3047
by: Egon Pasztor | last post by:
Hi. I'm new at CSS, so maybe this is obvious, but I've looked around quite a bit looking for a solution. I'm playing with the vertical positioning of elements in a 2-column layout. The prototype "scaffolding" page I'm playing with is here: http://www.eecs.berkeley.edu/~pasztor/test.html It looks right in "Mozilla Firefox", but not in IE 6. In IE 6, the three "nav" blocks are rendered right after one another in a vertical column.
12
6307
by: deko | last post by:
Is there any way to work around the blank space created by hidden divs? I'm trying to use a relatively postioned divs with show/hide behaviors to annotate an image. The divs show/hide onMouseOver/onMouseOut but leave a blank space on the page when hidden (the space where the divs would normally be). Is it possible to use z-indexing to put regular content where the hidden divs would be? When I try to do this, the layers don't unhide as...
15
13507
by: red | last post by:
How do I center two side by side divs ? I've been writing css pages for a while but there's one thing tha still eludes me. I can center a div with margin auto. I can place two divs side by side with float. But I can't center two side by side divs. If I float them and give them auto margins, the auto margins are ignored. If I wrap the two floated divs in another div, the two divs have no
3
13778
by: Marc | last post by:
Hi to all, I have several DIVs in a page, each has a unique name. I'd need a method to cycle through all DIVs so that I can change their style. For example, let's say I need to set a red background to DIVs whose name begins with "a". This is the pseudo code: For Each Div in The Page If Div's name starts with 'a' then set Div's background to Red Next
2
8287
by: tasman.hayes | last post by:
I'm experimenting with converting a site from a table layout to CSS. I'm floating three DIVs in a row for the top of a website (a logo, navigation buttons and a email list signup box). The DIVs have a grey background. When I view the page in Firefox, I get what I hoped for: there is a solid grey rectangle at the top of the website. When I view the page in Internet Explorer 6 (WinXP), there is a gap between two right hand DIVs (i.e. a...
3
1828
by: Carl Gilbert | last post by:
Hi I am looking to convert a site from HTML to ASP.NET making use of CSS. I have tried various combinations but I can not seem to get the correct combination of div and CSS tag configurations. I have uploaded a screenshot (http://www.bwbfc.com/math/regions.jpg) of how the screen will be laid out. Firstly it is all cantered in the window. I plan to create a master page which would contain the header (in blue), the footer (in yellow)...
19
6198
roula
by: roula | last post by:
I HATE DIVS AND DIFFERENT BROWSERS!!! i spent the whole day and night searching for a way to center align stupid divs, the problem is that the code is so sensitive, i lost my mind trying to make them work in a certain way (like some should scroll with a fixed background and others shouldn't scroll bla bla..) and the divs are nested and positioned in different ways and if i change something it gets messed up and what works in in IE doesn't work...
4
8413
by: Adam | last post by:
I have four roughly square DIVs, all the same height, which I need to line up horizontally across the page. What would be the best way to do this? At the moment I have a very botched solution where I have display:table-cell set on each of the DIVs. This works as far as lining them up is concerned, however to get any spacing between them the only thing I could do was to put some &nbsp; in between each one (margin had no effect). This...
11
7844
by: dusk | last post by:
Hi, I'm very new to javascript, and I'm having trouble finding a way to display a string of divs without the code getting really messy. I have several different pages to write, each with about 15-20 divs, and I need users to be able to select a sequence of divs - basically like a series of yes/no questions that, when "yes" or "no" is selected, displays the appropriate div as well as what's come before it. I can hide all divs and display...
0
9621
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
10106
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
10040
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,...
0
9914
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
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
6717
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
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
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
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.