PDA

View Full Version : Need some help. HTML 4.01 Transitional.



Fl4SH'ER
April 26th, 2007, 05:59 AM
Hi guys,

Ok, i have some question... I read some articles about HTML 4.01 and all that but i keep on running over this problem... I can't validate a HTML page... The thing is that i have a .swf file embeded that should scale w100% h100%...

Here's a pic of some common errors... i can't figure out how the heck to to change it... the code is correct but it says "error"... or maybe this is not used in HTML 4.01 transitional ? Anyways, i need some help on this...

http://img72.imageshack.us/img72/8826/plmvw7.jpg

PS: as i said, i have a .swf file embeded that should scale 100% 100% but it won't... how can i fix that ? It's like fill width but only 200px in hight... errr.... driving me nuts... what am i doing wrong ? Or should i try another HTML version not 4.01 ?

PS: and yeah, sorry for posting this here but i had no idea where to post it... :red:

Thanks,
Biro Barna

foodpk
April 26th, 2007, 06:04 AM
Which DOCTYPE are you using?
Also, if you want your site to stretch over the whole screen, when publishing in flash set the width to 100% and height to 100% and set it so it doesn't scale and you're good to go.

Fl4SH'ER
April 26th, 2007, 06:13 AM
I'm using HTML 4.01 Transitional <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

And well, the thing with 100% height and width works just ok if i'm not using any doctype... but if i start using a doctype it gets farked up and as i said, it stretches to 100% width but it remains at like 200xp at height... any other ideas ? maybe the problem is with HTML 4.01 ? should i use something else ?

duncanhall
April 26th, 2007, 06:20 AM
<embed> is not part of the XHTML specification, so it will not validate.

Use swfObject. Always.

Also, Firefox seems to have a bug that prevents it from reading a percentage as a value if there is a doctype declaration. So "width=100%" is probably just being read as "width=100". I don't know why this is, and it doesn't seem to happen with other browsers, but if you want to go full screen flash, you'll probably have to forego 100% validation.

Fl4SH'ER
April 26th, 2007, 06:29 AM
swfObject ? got an example on that one ? Thanks... And well, i hope everything will be ok if the validation is 100%... because that scale problem is quite annoying...

EDIT: Ok, i found that swfObject thingie... here's a link to what it is ( it might help others who run over the same problem ) http://blog.deconcept.com/swfobject/

Fl4SH'ER
April 26th, 2007, 07:30 AM
Ok, so i embeded the flash movie correctly and all the rest... the problem now that i need to solve is that height problem in FF... anyone has any idea why won't it stretch ? It's 100% width but it won't go 100% height... I remember that others faced the same problem and as i can remember there is a solution or something...

Anyone any ideas ? Or maybe a link ?

PS: now the page is HTML 4.01 Transitional ( VALID ) but it still won't stretch to 100% height... ahh, and one more thing... How can i get rid of the scroll bars in CSS ? An old tag was something like: scroll="no"... but it seems that it's not working the way it should anyone :)

Thanks,
Biro Barna

duncanhall
April 26th, 2007, 07:34 AM
overflow: hidden;

I think you're going to have to bite the bullet and just lose the DTD if you really want the full screen swf.

Fl4SH'ER
April 26th, 2007, 07:40 AM
^ yar, thanks :)

Fl4SH'ER
April 26th, 2007, 07:42 AM
Hmm, the interesting part was that it worked at 100% H and 100% W even when using DTD... the problem reappeared after i embedded the .swf file using swfObject ... any other ideas ? Duh, it must have a solution :)

Fl4SH'ER
April 26th, 2007, 08:08 AM
:lol: haha, i made it work...

So, the problem was the following: while fooling around with the code and moving/editing things... i accidentally deleted some essential code that resizes the page... my main problem was that i was using a margin of 6px... so the flash movie would stretch 100% W and 100% H but still have that 6px margin... So, it's a bit tricky because i actually need a 98% H of the page... Otherwise ( if i use 100% H ) you won't be able to see the bottom margin...


html {
height: 100%;
overflow: hidden;
}

#flashmovie {
height: 100%;
}

body {
height: 98%;
margin: 6px;
padding: 0px;
background-color: #D10381;
}^ that's the CSS code and "flashmovie" is the ID of the DIV that holds my .swf. Tested in almost all browsers and works perfectly ! :love: Long live Js and CSS !
And yeah, the page is still VALID HTML 4.01 Transitional.

Great God, finally works ! :thumb:
Thanks for the help guys.

Biro Barna