20 replies [Last post]
moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank since some text is added, and despite this the height (and so the background) is just filled for the height of the text?

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 1 year 41 weeks ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

Anybody knows why a 100% div on Opera is leaved blank?

To quote the computer from Star Treck "There is insufficient data for a meaningful answer".

In other words, it seems to me that you haven't told us anything like enough to even make a start on diagnosing your problem, whatever it is.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank?

I'll try to provide more input for a more specific reply.

Here is a block of the .css file which I'm working on, and this is the back block I use as the container for placing text and whatever I need.

#window
{
background: #ffffff url(../images/cell_foto_backg.jpg) repeat-y 17px 0px;
border-left: 1px solid Gray;
border-right: 1px solid Gray;
height: 100%;
width: 706px;
}

As you can see tthere is a 100% height, but on Opera 8.5.3 the background isn't displayed since I don't place another div insinde with some text or some other object.

For instance a simple div, no referer to css, with some text, or with a style that specify a fixed height in px, let me see the background since the end of those div.
It's quite abnormal.

Hopefull to have been more clear than before.

ANdrea

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 32 weeks 2 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Anybody knows why a 100% div on Opera is leaved blank?

100% will refer to 100 percent of it's containing element. Could you show us the entire HTML and CSS code please?

Put it inbetween the .

Verschwindende wrote:
  • CSS doesn't make pies

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Anybody knows why a 100% div on Opera is leaved blank?

As said height:100% needs to refer to something, it's quite normal that you would have nothing showing your element has no content and no real height.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank?

Actually I'm working on the web site ...

but I use it for a div nested into the html that has also 100% height.
And in IE it works fine.

But also adding the text I need, in the Firefox the 100% doesn't shrink up to the end of the content. The only way is to specify a fixed size.

http://www.web-ma.com/saet

you can find the file there.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Anybody knows why a 100% div on Opera is leaved blank?

We call a halt right there to this problem, please fix up your DTD so that you have browsers rendering in Standards mode, either remove the definition or add a full url, there's no point in trying to trouble shoot when browsers are in Quirks mode.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank?

What do you mean?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Anybody knows why a 100% div on Opera is leaved blank?

Try googling or better still if you had looked around the forum you would have noticed every fourth post mentions valid standards switching DTD's, the 'how to' section has further help on the subject or check my sig line or for that matter any of a dozen peoples sig lines, cant really make it any easier than that, other than to give it to you I suppose

copy 'n' paste:

 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
            "http://www.w3.org/TR/html4/loose.dtd"> 


Although it is preferable to use a strict definition unless there is a definite need to use transitional i.e you know that you are having to use deprecated tags/attributes

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 32 weeks 2 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Anybody knows why a 100% div on Opera is leaved blank?

moroandrea wrote:
What do you mean?

OH NO YOU DIDN'T

Evil Evil Evil

Verschwindende wrote:
  • CSS doesn't make pies

moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank?

did what? Also using the suggested doc type, I've always problems.

Look at web-ma.com/saet/allarmi-casa.html

Use Firefox and IE ... in this page you are able to see the bottom bar, in the othe two page (use upper menu, first and third item) you can't see it in IE, but in Firefox.

In the page suggested above, instead, I'm not able to fill the empty gap and do the #base div stay anchored to the bottom of the page.

Why??

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 32 weeks 2 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Anybody knows why a 100% div on Opera is leaved blank?

Remove this:

<?xml version="1.0" encoding="UTF-8"?>

and see if it works in IE then.

Verschwindende wrote:
  • CSS doesn't make pies

moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank?

no it doesn't and it create a lot of problems in addition.

I don't understand. general rule says to add it, and you say to remove.
Well I'm struggling and getting a lot of confusion from this css design only.

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 32 weeks 2 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Anybody knows why a 100% div on Opera is leaved blank?

General rule is incorrect. It's needed for Xhtml 1.1 to validate. Xhtml 1.0 DOESN'T need it, and by adding it in you throw IE into Quirks Mode, which is a bad thing.

Have you got a link to the page?

Verschwindende wrote:
  • CSS doesn't make pies

moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank?

www.web-ma.com/saet/allarmi-casa.html

I did some changes, but still have some troubles with the lower band.
I don't understand why I'm not able to place it to the bottom of the page and fill the blanks.

The only way I've found in firefox is use the min-height, but this means that a smaller video than mine see a white unuseful space.

In IE it doesn't work at all.

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 32 weeks 2 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Anybody knows why a 100% div on Opera is leaved blank?

Works fine for me, maybe upload a screenshot of what you're seeing?

You could be seeing the old version - press <ctrl> <f5> to do a forced refresh.

Verschwindende wrote:
  • CSS doesn't make pies

moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank?

how's your screen resolution?

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 32 weeks 2 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Anybody knows why a 100% div on Opera is leaved blank?

1152x864.

Verschwindende wrote:
  • CSS doesn't make pies

moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank?

strange resolution for a web developer. But that's the gap. at 1280 x 1024 you see the small area I'm talking about.
By the way, since this e-mail I'm writing and last post I read from you I've found the solution.

So actually it's solved. I need a small minor change to the background to solve it completely also behind firefox.

Thanks for your help.

Andrea

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 32 weeks 2 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Anybody knows why a 100% div on Opera is leaved blank?

No problem, glad you got it sorted Laughing out loud

And just so you know, the correct term is "left", not "leaved" Wink

Verschwindende wrote:
  • CSS doesn't make pies

moroandrea
Offline
newbie
Last seen: 16 years 38 weeks ago
Timezone: GMT+1
Joined: 2006-03-11
Posts: 10
Points: 0

Anybody knows why a 100% div on Opera is leaved blank?

ops the past Smile it's not a regular verb ... my english teacher crunck my head into the wall if she'll read it Smile

Thank you
Andrea