CSS Code Implementierung in php

  • Hallo liebe php Gemeinde,

    ich versuche verzweifelt ein css menü in ein php script zur zwängen. Aber die css Funktion (Ausklappmenü) geht dann leider nicht.

    so fängt die php datei an:

    ____________________________________


    PHP-Quellcode:

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


    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>2D-Ausklappmenu</title>


    <link rel="stylesheet" type="text/css" href="http://www.baltic-boyz.com/nordtribuene/T…c/menue/nav.css"><!--[if IE]>
    <style type="text/css" media="screen">
    #menu ul li {float: left; width: 100%;}
    </style>
    <![endif]--><!--[if lt IE 7]>
    <style type="text/css" media="screen">
    body {behavior: url(http://www.baltic-boyz.com/nordtribuene/T…ue/csshover.htc); font-size: 100%;}
    #menu ul li a {height: 1%;}
    }
    </style>
    <![endif]-->

    <div id="menu">

    <ul>
    [*]<h2>Titel 1</h2>
    <ul>
    [*]eins
    [*]zwei ...
    <ul>
    [*]zwei a
    [*]zwei b
    [*]zwei c
    [*]zwei d
    [/list]

    [*]drei ...
    <ul>
    [*]drei a
    [*]drei b ...
    <ul>
    [*]drei b i
    [*]drei b ii
    [*]drei b iii
    [/list]

    [*]drei c
    [/list]

    [/list]

    [/list]

    <ul>
    [*]<h2>Titel 2</h2>
    <ul>
    [*]eins
    [*]zwei ...
    <ul>
    [*]zwei a
    [*]zwei b
    [*]zwei c
    [*]zwei d
    [/list]

    [*]drei ...
    <ul>
    [*]drei a
    [*]drei b ...
    <ul>
    [*]drei b i
    [*]drei b ii
    [*]drei b iii
    [/list]

    [*]drei c
    [/list]

    [/list]

    [/list]

    <ul>
    [*]<h2>Titel 3</h2>
    <ul>
    [*]eins
    [*]zwei ...
    <ul>
    [*]zwei a
    [*]zwei b
    [*]zwei c
    [*]zwei d
    [/list]

    [*]drei ...
    <ul>
    [*]drei a
    [*]drei b ...
    <ul>
    [*]drei b i
    [*]drei b ii
    [*]drei b iii
    [/list]

    [*]drei c
    [/list]

    [/list]

    [/list]
    </div>
    <?php
    //hier kommen die php Befehle mit extra body und head bereich.
    ?>

  • Hallo!

    das Ausklappmenü geht wunderbar unter mozilla in php format.
    Aber der ie läßt das css ausklappmenü nicht ausklappen.
    Komischeweise geht das Ausklappmenü gespeicht als html im IE aber eben als php nicht!!>da nur unter mozilla.
    Woran kann das denn liegen??! Folgende Funktion die extra das CSS Problem in IE regelt habe ich rot gekennzeichnet.


    <?php
    // Version: 1.0; index

    /* This template is, perhaps, the most important template in the theme. It
    contains the main template layer that displays the header and footer of
    the forum, namely with main_above and main_below. It also contains the
    menu sub template, which appropriately displays the menu; the init sub
    template, which is there to set the theme up; (init can be missing.) and
    the linktree sub template, which sorts out the link tree.

    The init sub template should load any data and set any hardcoded options.

    The main_above sub template is what is shown above the main content, and
    should contain anything that should be shown up there.

    The main_below sub template, conversely, is shown after the main content.
    It should probably contain the copyright statement and some other things.

    The linktree sub template should display the link tree, using the data
    in the $context['linktree'] variable.

    The menu sub template should display all the relevant buttons the user
    wants and or needs.

    For more information on the templating system, please see the site at:
    http://www.simplemachines.org/
    */

    // Initialize the template... mainly little settings.
    function template_init()
    {
    global $context, $settings, $options, $txt;

    /* Use images from default theme when using templates from the default theme?
    if this is 'always', images from the default theme will be used.
    if this is 'defaults', images from the default theme will only be used with default templates.
    if this is 'never' or isn't set at all, images from the default theme will not be used. */
    $settings['use_default_images'] = 'never';

    /* What document type definition is being used? (for font size and other issues.)
    'xhtml' for an XHTML 1.0 document type definition.
    'html' for an HTML 4.01 document type definition. */
    $settings['doctype'] = 'xhtml';
    }

    // The main sub template above the content.
    function template_main_above()
    {
    global $context, $settings, $options, $scripturl, $txt;

    // Show right to left and the character set for ease of translating.
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
    <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js"></script>
    <script language="JavaScript" type="text/javascript"><!--
    var smf_theme_url = "', $settings['theme_url'], '";
    var smf_images_url = "', $settings['images_url'], '";
    // --></script>
    <title>', $context['page_title'], '</title>
    <link rel="stylesheet" type="text/css" href="http://www.baltic-boyz.com/nordtribuene/T…c/menue/nav.css"><!--[if IE]>
    <style type="text/css" media="screen">
    #menu ul li {float: left; width: 100%;}
    </style>
    <![endif]--><!--[if lt IE 7]>
    <style type="text/css" media="screen">
    body {behavior: url(http://www.baltic-boyz.com/nordtribuene/T…ue/csshover.htc); font-size: 100%;}
    #menu ul li a {height: 1%;}
    }
    </style>
    <![endif]-->
    <META NAME="Title" CONTENT="http://www.Nordtribuene.info">
    <META NAME="Author" CONTENT="Y-R - BWD94">
    <META NAME="Revisit" CONTENT="After 2 days">
    <META NAME="Keywords" CONTENT="FC Hansa, Nordtriebune.info, nordtriebüne, nofv, dfb, hansestadt, amateure, volksstadion, Ostseestadion, Hansa Fans, Hansa Forum, Youngs-Rostock, BWD94, Blau weiß Dynamik, fußball, fussball, hansa, bundesliga, Fan Forum, fan, fans, choreo, Hansa Rostock, FCH,">
    <META NAME="Description" CONTENT="Forum zur Nordtribüne des FC Hansa Rostock. Topaktuelle News und Hintergründe von Fans für Fans">
    <META NAME="Abstract" CONTENT="Forum zur Nordtribüne des FC Hansa Rostock">
    <meta name="page-topic" content="Fussball">
    <meta name="page-topic" content="News">
    <META NAME="audience" CONTENT="Alle">
    <META NAME="Robots" CONTENT="INDEX,FOLLOW">
    <META NAME="Language" CONTENT="Deutsch">
    <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css" />';

    /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
    Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
    Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
    Standards compliance mode happens when you use xhtml... */
    if ($context['browser']['needs_size_fix'])
    echo '
    <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';

    // Show all the relative links, such as help, search, contents, and the like.
    echo '
    <link rel="help" href="', $scripturl, '?action=help" target="_blank" />
    <link rel="search" href="' . $scripturl . '?action=search" />
    <link rel="contents" href="', $scripturl, '" />';

    // If we're viewing a topic, these should be the previous and next topics, respectively.
    if (!empty($context['current_topic']))
    echo '
    <link rel="prev" href="' . $scripturl . '?action=;topic=' . $context['current_topic'] . '.0;prev_next=prev" />
    <link rel="next" href="' . $scripturl . '?action=;topic=' . $context['current_topic'] . '.0;prev_next=next" />';

    // If we're in a board, or a topic for that matter, the index will be the board's index.
    if (!empty($context['current_board']))
    echo '
    <link rel="index" href="' . $scripturl . '?action=;board=' . $context['current_board'] . '.0" />';

    // Output any remaining HTML headers. (from mods, maybe?)
    echo $context['html_headers'], '
    </head>
    <body bgcolor="#333333">
    <div id="menu">

    <ul>
    [*]<h2>Titel 1</h2>

    ---hier fängt dann das Ausklappmenü an! welches unter mozilla sich ausklappt.----------

  • GreenRover

    also das menü geht unter IE also einzelne html datei!!!
    siehe hier: http://www.baltic-boyz.com/nordtribuene/T…klappmenue.html

    sobald es jedoch mit dem selben Inhalt in die php Datei gedrückt wird öffnet sich das menü nicht mehr.
    http://www.nordtribuene.info/

    @ricewind
    naja es geht unter IE als html und ein Fehler konnte ich auch nicht finden. Es geht hier glaube ich um die php umstellung des css codes.
    Backbone müßte mit:
    <!--[if IE]>
    <style type="text/css" media="screen">
    #menu ul li {float: left; width: 100%;}
    </style>
    <![endif]--><!--[if lt IE 7]>
    <style type="text/css" media="screen">
    body {behavior: url(http://www.baltic-boyz.com/nordtribuene/T…ue/csshover.htc); font-size: 100%;}
    #menu ul li a {height: 1%;}
    }
    </style>
    <![endif]-->

    abgedeckt sein
    Modula
    ja ok aber der hilft nicht weiter oder?


    VIELEN DANK für die ANTWORTEN.

  • Hallo!

    Kann mir jemand helfen??! Konnte das Problem immer noch nicht lösen siehe letzten Beitrag.