Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to center logo and menu items on flash/xml page

    Hello guys out there.
    I want you to know that I am a newbie and I have a problem with some XML code. I would like to center a logo and a menu in the page but I don't know how to do that. Could you please help out?

    This is the code:
    Code:
    <?xml version="1.0" ?>
    <?xml-stylesheet type="text/xsl" href="template.xslt"?>
    
    <home
    	  logo="data/images/logo.png"
    	  logo_x="100%"
    	  logo_y="100%"
    	
    	  menu_items_x="100%"
    	  menu_items_y="50%"
    	
    	  menuItemDistance="18"
    	  menuRows= "0"
    	  menuColumnsWidth="110"
    
    	  bg_alpha="20"
    	  pattern_alpha="50"
    	
    	  footer_color="0x000000"
    	  footer_bg_alpha="0"
    	  footer_text_color="0x666666"
    	  footerText="mypage| copyright 2011 | myname"
    	 
    	  swfPath="data/swf/"
    	  introBg="data/images/bg/bg.jpg"
    	  introfile="showcase.swf"
    >
    	
    
    	<item title="showcase" color="0xCCCCCC" colorOver="0x666666" typology="swf" file="showcase.swf" bg="data/images/bg/bg.jpg" />
    	<item title="about" color="0xCCCCCC" colorOver="0x666666" typology="swf" file="about.swf" bg="data/images/bg/bg_01.jpg" />
    	<item title="news" color="0xCCCCCC" colorOver="0x666666" typology="swf" file="news.swf" bg="data/images/bg/bg_02.jpg" />
    	<item title="contact" color="0xCCCCCC" colorOver="0x666666" typology="swf" file="contact.swf" bg="data/images/bg/bg_03.jpg" />
    	<item title="link" color="0xFF9900" colorOver="0x666666" typology="link" file="http://facebook.com" bg="data/images/bg/bg.jpg" />
    
    </home>

    In red is the content that I would like to see centered.
    Any suggestion is welcome.

    Thank you.
    Mr. pig
    Last edited by Alex Vincent; 12-14-2010 at 04:40 AM. Reason: Adding code tags

  • #2
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,460
    Thanks
    1
    Thanked 23 Times in 21 Posts
    I am trying to remember if CSS stylesheets would apply before or after the XSLT transformation. I think CSS can do what you want.

    Can you show us template.xslt?
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #3
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello Alex, thank you for your response.
    There is actually no XSLT linked to that code. That was just an attempt.

  • #4
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,460
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Oh. Well, then all you need is a <?xml-stylesheet ?> tag like that, but pointing to a CSS file, and with type="text/css". Then write your CSS file to center the desired text, as you normally would.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •