PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
NoFantasy
Worker
Worker


Joined: Apr 26, 2005
Posts: 114

PostPosted: Mon Jun 13, 2005 5:13 am Reply with quote Back to top

I want to show a picture as background to my links in a navigation-bar. As you can see, most of the values is selected from a database. This is working just fine (like the phpbb-forum does).

The strange thing is that IE shows the picture as it should, Firefox doesn't. The test-picture is width=135px height=25px. In Firefox, the picture ends where the text ends, not after 135px.

The css-part is like this:
Code:
echo "a.lmenu:link {background-image: $linkbackactiveimg; height: $linkbackheight".px."; width:$linkbackwidth".px."; background-repeat: no-repeat; background-position: 100% 100%; color: $linkcoloractive; font-size: $linksizeactive".px."; font-family: $linkface; text-decoration: $linkdecoactive; font-weight: $linkweightactive; font-style: $linkitalicactive}\n"
         ."a.lmenu:active {background-image: $linkbackactiveimg; height: $linkbackheight".px."; width:$linkbackwidth".px."; background-repeat: no-repeat; background-position: 100% 100%; color: $linkcoloractive; font-size: $linksizeactive".px."; font-family: $linkface; text-decoration: $linkdecoactive; font-weight: $linkweightactive; font-style: $linkitalicactive}\n"
         ."a.lmenu:visited {background-image: $linkbackactiveimg; height: $linkbackheight".px."; width:$linkbackwidth".px."; background-repeat: no-repeat; background-position: 100% 100%; color: $linkcoloractive; font-size: $linksizeactive".px."; font-family: $linkface; text-decoration: $linkdecoactive; font-weight: $linkweightactive; font-style: $linkitalicactive}\n"
         ."a.lmenu:hover {background-image: $linkbackhoverimg; height: $linkbackheight".px."; width:$linkbackwidth".px."; background-repeat: no-repeat; background-position: 100% 100%; color: $linkcolorhover; font-size: $linksizehover".px."; font-family: $linkface; text-decoration: $linkdecohover; font-weight: $linkweighthover; font-style: $linkitalichover}\n"


I ran my page trough
Only registered users can see links on this board!
Get registered or login to the forums!
without errors at all (at least not in this part). This was the output:

Code:
a.lmenu:link {
background-image : url(modules/Chatrom/copy.gif);
height : 25px;
width : 135px;
background-repeat : no-repeat;
background-position : 100% 100%;
color : #f2f2f2;
font-size : 16px;
font-family : Trebuchet MS;
text-decoration : none;
font-weight : bold;
font-style : italic;
}
a.lmenu:active {
background-image : url(modules/Chatrom/copy.gif);
height : 25px;
width : 135px;
background-repeat : no-repeat;
background-position : 100% 100%;
color : #f2f2f2;
font-size : 16px;
font-family : Trebuchet MS;
text-decoration : none;
font-weight : bold;
font-style : italic;
}
a.lmenu:visited {
background-image : url(modules/Chatrom/copy.gif);
height : 25px;
width : 135px;
background-repeat : no-repeat;
background-position : 100% 100%;
color : #f2f2f2;
font-size : 16px;
font-family : Trebuchet MS;
text-decoration : none;
font-weight : bold;
font-style : italic;
}
a.lmenu:hover {
background-image : url(modules/Chatrom/copy.gif);
height : 25px;
width : 135px;
background-repeat : no-repeat;
background-position : 100% 100%;
color : #f2f2f2;
font-size : 16px;
font-family : Trebuchet MS;
text-decoration : underline;
font-weight : bold;
font-style : italic;
}


Any ideas what may be wrong? Seems to me that Firefox don't get the height og width-values...
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15024
Location: Kansas

PostPosted: Mon Jun 13, 2005 7:03 am Reply with quote Back to top

I need to see the actual code because your definitions look fine. It's more of an issue, I believe, in the usage and html layout. Keep in mind that it's usually the case that IE is actually displaying it wrong because it's too forgiving. In any event, if the code is not too long, please post it. Otherwise, please provide a link to the code. Also, please provide a link to your site where this is used.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
NoFantasy
Worker
Worker


Joined: Apr 26, 2005
Posts: 114

PostPosted: Mon Jun 13, 2005 7:49 am Reply with quote Back to top

I'll send a PM with link to the site/page (since it's not finished yet).
View user's profile Send private message
NoFantasy
Worker
Worker


Joined: Apr 26, 2005
Posts: 114

PostPosted: Tue Jun 14, 2005 5:38 am Reply with quote Back to top

I think I have found a solution after all. At
Only registered users can see links on this board!
Get registered or login to the forums!
it's an example close to what I want the CSS-menu to do.
I don't actually know what all the elements control, but that's to find out. With a little modification my CSS looks like this:
Code:
a.lmenu:link {
display : block;
width : 135px;
margin : 0 0;
padding : 1px 0 0 1px;
font : bold 16px Trebuchet MS;
color : #f2f2f2;
background : url(modules/Chatrom/copy.gif) no-repeat 0 0;
text-decoration : none;
}
a.lmenu:active {
display : block;
width : 135px;
margin : 0 0;
padding : 1px 0 0 1px;
font : bold 16px Trebuchet MS;
color : #f2f2f2;
background : url(modules/Chatrom/copy.gif) no-repeat 0 0;
text-decoration : none;
}
a.lmenu:visited {
display : block;
width : 135px;
margin : 0 0;
padding : 1px 0 0 1px;
font : bold 16px Trebuchet MS;
color : #f2f2f2;
background : url(modules/Chatrom/copy.gif) no-repeat 0 0;
text-decoration : none;
}
a.lmenu:hover {
display : block;
width : 135px;
margin : 0 0;
padding : 1px 0 0 1px;
font : bold 16px Trebuchet MS;
color : #f2f2f2;
background : url(modules/Chatrom/copy.gif) no-repeat 0 0;
text-decoration : underline;
}

Both IE and FF now seems to have the same look, with the menu-images stretched to it's full length. I still don't know why my previous style didn't work, but perhaps that isn't very interesting.

What is the display : block; actually doing? I'm not 100% satisfied with the new CSS because it seems to be inserting an extra line-break between the image-elements.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15024
Location: Kansas

PostPosted: Tue Jun 14, 2005 9:09 am Reply with quote Back to top

I am glad you posted this. I searched my files yesterday and even contacted a few people. I knew there was an easy fix because I had been down this path before - I just couldn't remember what it was!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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 vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum