Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 3:49 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ]  Bookmark and Share
Author Message
 Post subject: Fixed position header in FireFox
PostPosted: Tue Mar 04, 2008 4:16 pm 
Offline

Joined: Tue Mar 04, 2008 4:01 pm
Posts: 4
Have the following code giving me what I need in IE6 and IE7, but Firefox won't center the header. If I take out the fixed position part, it centers, but the client wants it fixed. I'm not a pro, so I'd appreciate a little help before I bang my head against the wall... Any takers - many thanks?

[code]html,body {
padding:0;
height:100%;
background:#DAD2DA;
font: normal 14px Comic Sans MS;
margin: 0 auto;
}
html>body #wrap
{
height:100%;
margin: 0 auto;
border-left:solid 1px #336699;
border-right:solid 1px #336699;
border-top:solid 1px #336699;
}
#wrap
{ margin: 0 auto;
}
#header
{
margin: 0 auto !important;
position:fixed;
background-image: url(http://mydomain/banner.jpg);
width:760px;
height:130px;
z-index:10;
border-top:solid 1px #336699;
border-left:solid 1px #336699;
border-right:solid 1px #336699;
}
html>body #header
{
margin: 0 auto !important;
position:fixed;
background-image: url(http://mydomain/banner.jpg);
width:760px;
height:130px;
z-index:10;
}
html>body #header-content
{
position:relative;
float:left;
margin: 105px 0px 0px 340px;
}
#header-content
{
position:relative;
float:left;
margin: 105px 0px 0px 170px;
}
html>body #content-wrap
{...yada yada[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 3:26 am 
Offline
500+ Club
User avatar

Joined: Wed Feb 27, 2008 6:14 am
Posts: 929
Location: Cebu City Philippines
Why do you have html>body in your CSS declaration.

Try deleting it.

One thing, this code:
Code:
html>body #header-content
{
position:relative;
float:left;
margin: 105px 0px 0px 340px;
}
#header-content
{
position:relative;
float:left;
margin: 105px 0px 0px 170px;
}


I suppose they are the same, observe that you have set two different margins on a single div. It might cause the conflict.

..and if nothing works, could you provide a link for your page....:D

_________________
~ Get me some work, I do freelancing ~


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 11:11 pm 
Offline

Joined: Tue Mar 04, 2008 4:01 pm
Posts: 4
hiya rangana,
Thanks for the reply. I changed the code to the following, but it still didn't do anything about centering in Firefox with fixed position. Any other ideas? (the reason for the underscored margin is for IE6)

[code]html,body
{
padding:0;
height:100%;
background:#DAD2DA;
font: normal 14px Comic Sans MS;
margin: 0 auto;
}
#wrap
{
height:100%;
margin: 0 auto;
border-left:solid 1px #336699;
border-right:solid 1px #336699;
border-top:solid 1px #336699;
}

#header
{
margin:0 auto;
position:fixed;
background-image: url(http://www84.mahec.net/images/banner.jpg);
width:760px;
height:130px;
z-index:10;
border-top:solid 1px #336699;
border-left:solid 1px #336699;
border-right:solid 1px #336699;
z-index:10;
}
#header-content
{
position:relative;
float:left;
margin: 105px 0px 0px 340px;
_margin: 105px 0px 0px 170px;
}[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 06, 2008 12:48 am 
Offline
500+ Club
User avatar

Joined: Wed Feb 27, 2008 6:14 am
Posts: 929
Location: Cebu City Philippines
Could you also wrap the html.

_________________
~ Get me some work, I do freelancing ~


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 06, 2008 3:05 pm 
Offline

Joined: Tue Mar 04, 2008 4:01 pm
Posts: 4
Rangana,
What do you mean "wrap" the html?
Janet


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 07, 2008 3:11 am 
Offline
500+ Club
User avatar

Joined: Wed Feb 27, 2008 6:14 am
Posts: 929
Location: Cebu City Philippines
My apologies, I did'nt mean to get you confused.
"wrap" means, put your HTML code too..inside the
Quote:
[ code ][ / code ]
in this forum. :mrgreen:

_________________
~ Get me some work, I do freelancing ~


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley