472,958 Members | 2,565 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

CSS Positioning Question????

Please,

Why is this wide 6px border showing up where it is. It's supposed to be
at the bottom of the page, inside of base div. I'm positioning wrong,
something needs to cleared or x-index specified, or something. HELP???

http://wholives.com/temp/cssr.htm
Thanks,
me
Jul 21 '05 #1
7 1828
theo wrote:
Please,
Why is this wide 6px border showing up where it is. It's supposed to be
at the bottom of the page, inside of base div. I'm positioning wrong,
something needs to cleared or x-index specified, or something. HELP???
http://wholives.com/temp/cssr.htm
Thanks,
me


I believe Floated divs aren't considered part of the normal flow, clear
forces them to be included in the flow.

http://www.w3.org/TR/REC-CSS2/visuren.html#q28

..clear{
clear: both;
}

<div class='clear'></div>

Add an empty clear div after the barright and contentright divs.

A way to diagonse this for yourself would be to wrap all 3 "bar..."
divs in a #bar div, set the border: 1px solid red; and see where the red
border shows up with and without the clear div placed after the barright
div. Do the same thing with the "content..." divs, you'll see right the
difference right away.

Mike
Jul 21 '05 #2
> I believe Floated divs aren't considered part of the normal flow, clear
forces them to be included in the flow.


Mike,
You're right. I had to put the base div to float left also, like the rest
of them, to keep it going. It's not left, obviously, cause it's set at full
width of the page, but had to float left to keep the logic flowing.

Thanks,
Mike
Jul 21 '05 #3
mscir wrote:
theo wrote:
Please,
Why is this wide 6px border showing up where it is. It's supposed
to be
at the bottom of the page, inside of base div. I'm positioning wrong,
something needs to cleared or x-index specified, or something. HELP???
http://wholives.com/temp/cssr.htm
Thanks,
me

I believe Floated divs aren't considered part of the normal flow, clear
forces them to be included in the flow.


My explanation based on my understanding of float/clear:

Sice everything is floated except for the heavy bordered "base" box, the
floated boxes are out of the normal flow and the "base" box (in flow)
tries to flow to the side of the floated items but finds no space for
itself, so it wraps down to the next available space for it (and centers
its content there as instructed).

The thing is that the "base" box encompasses the full area from the top
and left of the floated item(s), down to its own bottom and the full
width of the viewport (less any margin), explaining why the thick border
applies to the whole area and not only for the "base" contents.

Applying a clear:left; to "base" will cause it to clear all the left
floated boxes by no longer being tied to the floated boxes in trying to
flow to the side of the floated boxes but to go seek space for itself
immediately below the lowest floated box. It does so (with its contents
centered) and its box no longer includes the floated boxes.

--
Gus
Jul 21 '05 #4
theo wrote:
I believe Floated divs aren't considered part of the normal flow, clear
forces them to be included in the flow.

Mike,
You're right. I had to put the base div to float left also, like the rest
of them, to keep it going. It's not left, obviously, cause it's set at full
width of the page, but had to float left to keep the logic flowing.

Thanks,
Mike


That is not the right thing to do in my opinion.
Simply add clear:left; to #base ia all.
You may wish to try also adding margin:0 30%; or something like it to
alter the thick border's left and right.

Looking at the overall structure of the page, I would have approached
the whole thing differently, by floating the left column "left", the
right column "right" and permitting the center item to flow down the
middle. Then I would have applied clear:both; for #base in order to
clear both columns.

--
Gus
Jul 21 '05 #5

"Gus Richter" <gu********@netscape.net> wrote in message
news:Aa********************@golden.net...
mscir wrote:
theo wrote:
Please,
Why is this wide 6px border showing up where it is. It's supposed
to be
at the bottom of the page, inside of base div. I'm positioning wrong,
something needs to cleared or x-index specified, or something. HELP???
http://wholives.com/temp/cssr.htm
Thanks,
me

I believe Floated divs aren't considered part of the normal flow, clear
forces them to be included in the flow.


My explanation based on my understanding of float/clear:

Sice everything is floated except for the heavy bordered "base" box, the
floated boxes are out of the normal flow and the "base" box (in flow)
tries to flow to the side of the floated items but finds no space for
itself, so it wraps down to the next available space for it (and centers
its content there as instructed).

The thing is that the "base" box encompasses the full area from the top
and left of the floated item(s), down to its own bottom and the full
width of the viewport (less any margin), explaining why the thick border
applies to the whole area and not only for the "base" contents.

Applying a clear:left; to "base" will cause it to clear all the left
floated boxes by no longer being tied to the floated boxes in trying to
flow to the side of the floated boxes but to go seek space for itself
immediately below the lowest floated box. It does so (with its contents
centered) and its box no longer includes the floated boxes.

--
Gus


Gus,
Thanks, I was wondering about that one. All of those float lefts throw
things off center, slightly, so I had to keep going with the float. All of
those divs, is the float necessary to keep them positioned, in rows of
three, or is there another option? I don't know, I'm just going from what
I've seen elsewhere.
Thanks,
me
Jul 21 '05 #6

Applying a clear:left; to "base" will cause it to clear all the left


Cheers,
I applied the clear:left. It does seem centered, fairly. I'm not sure
why the three div rows will only take 99% total width, and not 100%. There
are no left or right margins or padding.
http://wholives.com/temp/cssr.htm

Thanks,
me
Jul 21 '05 #7
theo wrote:
Applying a clear:left; to "base" will cause it to clear all the left

Cheers,
I applied the clear:left. It does seem centered, fairly. I'm not sure
why the three div rows will only take 99% total width, and not 100%. There
are no left or right margins or padding.
http://wholives.com/temp/cssr.htm

Thanks,
me


Browser apply a default value for margin and padding. For example, Gecko
uses margin and Opera uses padding. I believe that they also use
different values (whatever they are). It is good practice to use
margin:0; border:0; on body or to specifically set a desired value
which then is used by the browsers.

--
Gus
Jul 21 '05 #8

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

Similar topics

8
by: Bryan R. Meyer | last post by:
Hello Everyone, I am in the process of redesigning my web page and I ran into a problem while using CSS. I have laid out my web page with auto margins so that the content is centered. I assume...
2
by: Tim Charles | last post by:
Hello I am close to finishing my first properly css-friendly site (at least I hope it is), and am looking for some general feedback, plus a specific question answered, if possible. ...
6
by: rajek | last post by:
I posted a similar question yesterday, but didn't get an answer that resolved the issue. (Thanks to those who tried though.) The background: I've read in books and online that if you have one...
1
by: Mr.Clean | last post by:
I'm having trouble with this. The checkbox is no where near where it is supposed to be and the radio button is not at 206 px away from the left of the window. Looks bad in IE6, even worse in...
11
by: NS | last post by:
I am relativly new to css positioning and have a question regarding the display of a DHTML pop-up Here is the basic HTML I am using: <html> <head> <script language="JavaScript"> <!--
2
by: Johnson Smith | last post by:
Question is related to ASP.Net and controlling the position of these controls. I am using html table to placce my web controls. I am displaying same datagrid and calendar controls at clicks of...
4
by: Alan Silver | last post by:
Hello, Having been a light reader of this ng for a few months now (after several years absence), I have noticed that absolute positioning seems to be considered a Very Bad Thing around here....
9
by: Bill Norton | last post by:
I've been experimenting with floats, positioning and offsets (top, left, etc.) to see what happens when you mix the properties together. All this may be old news to most of you, but it was...
5
by: Howard | last post by:
I have seen a lot of examples of 2 & 3 Collumn layout schemes. But I have not yet found any examples for positioning images and centering them by the browser. I notice that there are CSS...
1
by: Froggluver | last post by:
I have some experience with CSS. Just enough to be dangerous in fact. :) I had a general question about positioning. Is it possible create a box that is absolutely positioned on a page, and then...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.