473,387 Members | 1,882 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,387 software developers and data experts.

divs/layout question (FF problem..)


pls look @ this pg, http://www.mayacove.com/design/divs.html in IE and FF..

in IE it looks fine, but in FF the main div (centered, 800px wide, blue
background; in reality the bg will be white..) won't display all the way
down... (I tried height:100% for it but it still only went as high as
the browser window..)

only reason am having this problem is that I want to do a
background-image BEHIND the main div.. but it's not cooperating...;)
in FF the footer also appears in wrong place.. have spent a long time
on this..... am almost ready to switch to table-based layout.. it
would make this so much simpler....;)

(this is for a blog, though, and for blogs layouts are always done in
divs..)

thank you very much....



Oct 21 '07 #1
18 2454
In article <ff**********@aioe.org>, maya <ma********@yahoo.com>
wrote:
pls look @ this pg, http://www.mayacove.com/design/divs.html in IE and FF..

in IE it looks fine, but in FF the main div (centered, 800px wide, blue
background; in reality the bg will be white..) won't display all the way
down... (I tried height:100% for it but it still only went as high as
the browser window..)

only reason am having this problem is that I want to do a
background-image BEHIND the main div.. but it's not cooperating...;)
in FF the footer also appears in wrong place.. have spent a long time
on this..... am almost ready to switch to table-based layout.. it
would make this so much simpler....;)

(this is for a blog, though, and for blogs layouts are always done in
divs..)

In cases like this, it is best to start with valid html. Would
you mind reproducing this with the bare minimum code and styles
that display the problem you have, starting with valid code with
a proper doctype?

--
dorayme
Oct 21 '07 #2
dorayme wrote:
In article <ff**********@aioe.org>, maya <ma********@yahoo.com>
wrote:
>pls look @ this pg, http://www.mayacove.com/design/divs.html in IE and FF..

in IE it looks fine, but in FF the main div (centered, 800px wide, blue
background; in reality the bg will be white..) won't display all the way
down... (I tried height:100% for it but it still only went as high as
the browser window..)

only reason am having this problem is that I want to do a
background-image BEHIND the main div.. but it's not cooperating...;)
in FF the footer also appears in wrong place.. have spent a long time
on this..... am almost ready to switch to table-based layout.. it
would make this so much simpler....;)

(this is for a blog, though, and for blogs layouts are always done in
divs..)


In cases like this, it is best to start with valid html. Would
you mind reproducing this with the bare minimum code and styles
that display the problem you have, starting with valid code with
a proper doctype?
ok, the page validates now...:)

http://validator.w3.org/check?uri=ht...e&ss=1&group=0

(and took out unnecessary css..)

thank you very much....

Oct 21 '07 #3
rf

"maya" <ma********@yahoo.comwrote in message news:ff**********@aioe.org...
>
pls look @ this pg, http://www.mayacove.com/design/divs.html in IE and
FF..

in IE it looks fine, but in FF the main div (centered, 800px wide, blue
background; in reality the bg will be white..) won't display all the way
down... (I tried height:100% for it but it still only went as high as the
browser window..)
In this case (as usual) IE is getting it wrong.

You have specified height: 600px for that div with the white background.
That is what FF is giving you. 600 pixels, just like you said.

If you do not want the content of that div to escape out of the bottom of
the div then do not give that div any height. And why 600 pixels. Are you
trying to anticipate the height of my browser canvas? Well, you have got it
totally wrong :-)
only reason am having this problem is that I want to do a background-image
BEHIND the main div.. but it's not cooperating...;)
in FF the footer also appears in wrong place.. have spent a long time on
this..... am almost ready to switch to table-based layout.. it would
make this so much simpler....;)
You could start by omiting most of your positioning stuff. Why do you float
the content div. Why do you give it a width in pixels. That in itself causes
me to suddenly lose interest.
(this is for a blog, though, and for blogs layouts are always done in
divs..)
Is that right? :-)

--
Richard.
Oct 21 '07 #4
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:

In my last, I should have typed the after "both;" to read:

<div style="clear:both;></div>

--
dorayme
Oct 21 '07 #5
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:

In my last, I should have typed the after "both;" to read:

<div style="clear:both;></div>
o shit...

<div style="clear:both;"></div>

--
dorayme
Oct 21 '07 #6
rf

"dorayme" <do************@optusnet.com.auwrote in message
news:do**********************************@news-vip.optusnet.com.au...
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
>In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:

In my last, I should have typed the after "both;" to read:

<div style="clear:both;></div>

o shit...

<div style="clear:both;"></div>
Hard day at the office ^H^H^H beach, girl?

'Twas a good day for it. Myself, well, in the garden shovelling dirt around
:-(

--
Richard.
Oct 21 '07 #7
rf wrote:
"maya" <ma********@yahoo.comwrote in message news:ff**********@aioe.org...
>pls look @ this pg, http://www.mayacove.com/design/divs.html in IE and
FF..

in IE it looks fine, but in FF the main div (centered, 800px wide, blue
background; in reality the bg will be white..) won't display all the way
down... (I tried height:100% for it but it still only went as high as the
browser window..)

In this case (as usual) IE is getting it wrong.

You have specified height: 600px for that div with the white background.
That is what FF is giving you. 600 pixels, just like you said.
actually no, I have a height of 600px for the two divs INSIDE the 'main'
div... and those are there purely for testing purposes, in real life
I'm not specifying height for ANY divs...

if I take out 'float:left;' for left-div as you suggest, the div is
centered, and putting 'align="left" in the div tag outside css did not
center it..

my gosh, this is working now....:) even in FF...
http://www.mayacove.com/design/divs.html

not sure what did it.. (I even left float:left for the left-content div,
and it still works now.. and am not sure what changed....;) I don't
believe this, I spent so much time on this yesterday...

thank you very much...

>
If you do not want the content of that div to escape out of the bottom of
the div then do not give that div any height. And why 600 pixels. Are you
trying to anticipate the height of my browser canvas? Well, you have got it
totally wrong :-)
>only reason am having this problem is that I want to do a background-image
BEHIND the main div.. but it's not cooperating...;)
in FF the footer also appears in wrong place.. have spent a long time on
this..... am almost ready to switch to table-based layout.. it would
make this so much simpler....;)

You could start by omiting most of your positioning stuff. Why do you float
the content div. Why do you give it a width in pixels. That in itself causes
me to suddenly lose interest.
>(this is for a blog, though, and for blogs layouts are always done in
divs..)

Is that right? :-)
Oct 21 '07 #8
maya wrote:
my gosh, this is working now....:) even in FF...
http://www.mayacove.com/design/divs.html
But it's broken in IE6. (Do you test in IE6? You should, since it's
still the predominant brower.)

Why not just do this:

<div id="main">
<div id="header">content</div>
<div id="content">content</div>
<div id="sidebar">content</div>
<div id="footer">content</div>
</div>

And the barebones CSS:

#main {
width: 800px;
margin: 0 auto;
}
#content {
width: 500px; /* or whatever */
float: left;
}
#sidebar {
width: 200px;
float: right;
}
#footer {
clear: both;
}

Clearing the footer will cause #main to contain the floated divs, hence
you'll see the background colour all the way down.
Oct 21 '07 #9
John L. wrote:
maya wrote:
>my gosh, this is working now....:) even in FF...
http://www.mayacove.com/design/divs.html

But it's broken in IE6. (Do you test in IE6? You should, since it's
still the predominant brower.)
oh brother.. you know, when I upgraded to IE7, I did it mainly so I
could test.. then I found you can't have IE 7 and IE 6 installed at the
same time.. do you know if there's a way around this??

ok, this one, http://www.mayacove.com/design/divs2.html
contains exact code you wrote, and it seems to be working in FF and
IE7.. can u pls see if it works in IE6? (oh brother, now have to
'transfer' this bare-bones code to the blog stylesheet... yikes....;)

thank you very much..
>
Why not just do this:

<div id="main">
<div id="header">content</div>
<div id="content">content</div>
<div id="sidebar">content</div>
<div id="footer">content</div>
</div>

And the barebones CSS:

#main {
width: 800px;
margin: 0 auto;
}
#content {
width: 500px; /* or whatever */
float: left;
}
#sidebar {
width: 200px;
float: right;
}
#footer {
clear: both;
}

Clearing the footer will cause #main to contain the floated divs, hence
you'll see the background colour all the way down.
Oct 21 '07 #10
maya wrote:
John L. wrote:
>maya wrote:
>>my gosh, this is working now....:) even in FF...
http://www.mayacove.com/design/divs.html

But it's broken in IE6. (Do you test in IE6? You should, since it's
still the predominant brower.)

oh brother.. you know, when I upgraded to IE7, I did it mainly so I
could test.. then I found you can't have IE 7 and IE 6 installed at the
same time.. do you know if there's a way around this??
You could try running the standalone version available here:

http://browsers.evolt.org/?ie/32bit/standalone

Running IE6 in this way makes it about as stable as nitroglycerine, but
for checking layouts it's OK.
ok, this one, http://www.mayacove.com/design/divs2.html
contains exact code you wrote, and it seems to be working in FF and
IE7.. can u pls see if it works in IE6?
The layout works in IE6.
Oct 21 '07 #11
John L. wrote:
maya wrote:
>John L. wrote:
>>maya wrote:

my gosh, this is working now....:) even in FF...
http://www.mayacove.com/design/divs.html

But it's broken in IE6. (Do you test in IE6? You should, since it's
still the predominant brower.)

oh brother.. you know, when I upgraded to IE7, I did it mainly so I
could test.. then I found you can't have IE 7 and IE 6 installed at
the same time.. do you know if there's a way around this??

You could try running the standalone version available here:

http://browsers.evolt.org/?ie/32bit/standalone

Running IE6 in this way makes it about as stable as nitroglycerine, but
for checking layouts it's OK.
>ok, this one, http://www.mayacove.com/design/divs2.html
contains exact code you wrote, and it seems to be working in FF and
IE7.. can u pls see if it works in IE6?

The layout works in IE6.
my gosh.. how stupid of me, just looked @ what doctype blog-code uses..
and found all this!!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta name="generator" content="WordPress 2.3" />

so put all this on top of my code now.. made chgs necessary for XHTML,
it validates.....;)

but I once again I need to know if it works in IE6.. thank you very much...

Oct 21 '07 #12
maya wrote:
John L. wrote:
>maya wrote:
>>John L. wrote:
maya wrote:

my gosh, this is working now....:) even in FF...
http://www.mayacove.com/design/divs.html

But it's broken in IE6. (Do you test in IE6? You should, since it's
still the predominant brower.)

oh brother.. you know, when I upgraded to IE7, I did it mainly so I
could test.. then I found you can't have IE 7 and IE 6 installed at
the same time.. do you know if there's a way around this??

You could try running the standalone version available here:

http://browsers.evolt.org/?ie/32bit/standalone

Running IE6 in this way makes it about as stable as nitroglycerine,
but for checking layouts it's OK.
>>ok, this one, http://www.mayacove.com/design/divs2.html
contains exact code you wrote, and it seems to be working in FF and
IE7.. can u pls see if it works in IE6?

The layout works in IE6.

my gosh.. how stupid of me, just looked @ what doctype blog-code uses..
and found all this!!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta name="generator" content="WordPress 2.3" />

so put all this on top of my code now.. made chgs necessary for XHTML,
it validates.....;)

but I once again I need to know if it works in IE6.. thank you very
much...
(I can't get that standalone IE6 to work (get error when open app.. app
failed to initialize properly..), maybe it doesn't work in Vista??)

thank you again..

Oct 21 '07 #13
maya wrote:
(I can't get that standalone IE6 to work (get error when open app.. app
failed to initialize properly..), maybe it doesn't work in Vista??)
Nope it doesn't, blow a kiss to Big Bill! In Vista you have to setup a
virtual machine to run EI6. The rest of us will cling to our XP with a
death-grip!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Oct 21 '07 #14
Jonathan N. Little wrote:
maya wrote:
>(I can't get that standalone IE6 to work (get error when open app..
app failed to initialize properly..), maybe it doesn't work in Vista??)

Nope it doesn't, blow a kiss to Big Bill! In Vista you have to setup a
virtual machine to run EI6. The rest of us will cling to our XP with a
death-grip!
in Vista you have to set up WHAT to run IE6?? oh man... well, I need
it at work too, where I'm on XP, so will try it at work tomorrow....:)
once again thank you very much...

Oct 21 '07 #15
maya wrote:
Jonathan N. Little wrote:
>maya wrote:
>>(I can't get that standalone IE6 to work (get error when open app..
app failed to initialize properly..), maybe it doesn't work in Vista??)

Nope it doesn't, blow a kiss to Big Bill! In Vista you have to setup a
virtual machine to run EI6. The rest of us will cling to our XP with a
death-grip!

in Vista you have to set up WHAT to run IE6?? oh man...
Yep. Royal pain.
well, I need
it at work too, where I'm on XP, so will try it at work tomorrow....:)
once again thank you very much...
On XP you'll be4 able to do it, no problem. I have versions 4.01 through
7 on the XP box.
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Oct 21 '07 #16
rf

"maya" <ma********@yahoo.comwrote in message news:ff**********@aioe.org...
rf wrote:
>"maya" <ma********@yahoo.comwrote in message
news:ff**********@aioe.org...
>>pls look @ this pg, http://www.mayacove.com/design/divs.html in IE and
FF..

in IE it looks fine, but in FF the main div (centered, 800px wide, blue
background; in reality the bg will be white..) won't display all the way
down... (I tried height:100% for it but it still only went as high as
the browser window..)

In this case (as usual) IE is getting it wrong.

You have specified height: 600px for that div with the white background.
That is what FF is giving you. 600 pixels, just like you said.

actually no, I have a height of 600px for the two divs INSIDE the 'main'
div... and those are there purely for testing purposes, in real life I'm
not specifying height for ANY divs...
I don't know what you were looking at but I was looking at the firebug
inspect panel. I positioned the cursor over the text (that was getting out
of the box) and firebug reported that it lived inside a div with height: 600
px specified.

It's not there now, of course.

--
Richard.
Oct 21 '07 #17

first of all, I want to thank everyone who has helped me with this
problem.. finally applied all css code (& the few necessary changes in
interface code) to 'real' blog.. however: find that in blog it's still
wrong in FF.. and I just made the HORRIBLE discovery that it works if I
take out this from on top of main index pg for blog:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

if I take out this code it works fine (again, problem: 'main' div, which
just has white bg-color, holds all content.. in FF don't see white bg
for 'main' div.. this is a problem only in FF, not IE..) but if I leave
that code in it still doesn't work in FF, and it seems I'm back in
square one...:(

(however, when was testing locally, putting all code in html (instead of
php) it worked fine with all XHTML code in it (as can be seen here,
http://www.mayacove.com/design/indexg.html.. real blog is here,
www.francesblog.com)

of course don't suppose for 'real' blog can take out all XHTML-related
stuff... I don't think Word Press would like that very much...;)

oh brother...
rf wrote:
"maya" <ma********@yahoo.comwrote in message news:ff**********@aioe.org...
>rf wrote:
>>"maya" <ma********@yahoo.comwrote in message
news:ff**********@aioe.org...
pls look @ this pg, http://www.mayacove.com/design/divs.html in IE and
FF..

in IE it looks fine, but in FF the main div (centered, 800px wide, blue
background; in reality the bg will be white..) won't display all the way
down... (I tried height:100% for it but it still only went as high as
the browser window..)
In this case (as usual) IE is getting it wrong.

You have specified height: 600px for that div with the white background.
That is what FF is giving you. 600 pixels, just like you said.
actually no, I have a height of 600px for the two divs INSIDE the 'main'
div... and those are there purely for testing purposes, in real life I'm
not specifying height for ANY divs...

I don't know what you were looking at but I was looking at the firebug
inspect panel. I positioned the cursor over the text (that was getting out
of the box) and firebug reported that it lived inside a div with height: 600
px specified.

It's not there now, of course.
Oct 26 '07 #18
never mind.. ended up doing w/table after all.. just put all content
inside a table width 850, centered.. ;)
www.francesblog.com

thank you very much..

maya wrote:
>
first of all, I want to thank everyone who has helped me with this
problem.. finally applied all css code (& the few necessary changes in
interface code) to 'real' blog.. however: find that in blog it's still
wrong in FF.. and I just made the HORRIBLE discovery that it works if I
take out this from on top of main index pg for blog:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

if I take out this code it works fine (again, problem: 'main' div, which
just has white bg-color, holds all content.. in FF don't see white bg
for 'main' div.. this is a problem only in FF, not IE..) but if I leave
that code in it still doesn't work in FF, and it seems I'm back in
square one...:(

(however, when was testing locally, putting all code in html (instead of
php) it worked fine with all XHTML code in it (as can be seen here,
http://www.mayacove.com/design/indexg.html.. real blog is here,
www.francesblog.com)

of course don't suppose for 'real' blog can take out all XHTML-related
stuff... I don't think Word Press would like that very much...;)

oh brother...
rf wrote:
>"maya" <ma********@yahoo.comwrote in message
news:ff**********@aioe.org...
>>rf wrote:
"maya" <ma********@yahoo.comwrote in message
news:ff**********@aioe.org...
pls look @ this pg, http://www.mayacove.com/design/divs.html in IE
and FF..
>
in IE it looks fine, but in FF the main div (centered, 800px wide,
blue background; in reality the bg will be white..) won't display
all the way down... (I tried height:100% for it but it still only
went as high as the browser window..)
In this case (as usual) IE is getting it wrong.

You have specified height: 600px for that div with the white
background. That is what FF is giving you. 600 pixels, just like you
said.
actually no, I have a height of 600px for the two divs INSIDE the
'main' div... and those are there purely for testing purposes, in
real life I'm not specifying height for ANY divs...

I don't know what you were looking at but I was looking at the firebug
inspect panel. I positioned the cursor over the text (that was getting
out of the box) and firebug reported that it lived inside a div with
height: 600 px specified.

It's not there now, of course.
Oct 26 '07 #19

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

Similar topics

0
by: Olly | last post by:
I am using the following pure css layout with a header and footer: http://www.fu2k.org/alex/css/layouts/3Col_NN4_FMFM.mhtml The left column floats to the left of the main content (middle...
4
by: Mimo Zus | last post by:
I'm hoping that someone can explain what's going on; better yet provide a workaround. I'm designing a centered CSS site based on a 550 pixel wide vertical background image. Onto this background...
3
by: Henk | last post by:
Hi, I am a beginner at CSS and think there is a big disadvantage using DIVs in combination with CSS. What I see happening, on sites like CSS Zen Garden etc is the following. People claim that...
6
by: veerleverbr | last post by:
Hi, I have the following html: <div id="content"> <div id="leftpart">...</div> <div id="rightpart">...</div> </div> leftpart en rightpart are in the css set to float left. The content of...
14
by: Daniel | last post by:
Hi i have a requirement for the following layout in my masterpage: 1 div for header 1 div for footer Between those divs i want a div for the left menu, then a div for the content in the...
3
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....
4
bakum
by: bakum | last post by:
Hi, i've got a basic layout as follows: One large table (height 100%) with two columns, left and right. Inside the left column are two divs#bottom #top. Inside the right column is one div#main. ...
6
by: =?Utf-8?B?Tkg=?= | last post by:
Hi, What do you recommend for defining the layout of an asp.net 2.0 page? Leaving masterpages and user controls aside for the moment is the use of tables or Divs the best approach? I have...
6
Motoma
by: Motoma | last post by:
Hello all! My end goal is to create an HTML layout that will expand and contract with the window size, while maintaining a variable number of content columns. In the example below, you will see...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.