473,511 Members | 15,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1849
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
5394
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
2148
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
2662
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
6321
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
2622
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
1778
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
2089
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
3372
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
2394
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
1455
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...
0
7356
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,...
1
7085
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
5671
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,...
1
5069
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4741
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...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
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 ...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
449
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...

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.