www.webdeveloper.com
Results 1 to 8 of 8

Thread: [RESOLVED] CSS Cry for help

  1. #1
    Join Date
    May 2010
    Posts
    4

    resolved [RESOLVED] CSS Cry for help

    Hey all,

    I'm new here, but I hope that doesn't mean that I'll be ignored. I've been rebuilding my company's website and migrating us to the Joomla! system.

    I've been making sure to continually use the validator's to make sure the code is correct. However, I found an error that I do not know how to fix. W3C returned my site's CSS as having only one error. This error references the jv.css.php file. I've looked at the .php file that is indicated as the problem, but the format is not like a CSS style sheet.

    I am really in need of some help, as searching these terms didn't return much useful, although it did lead me here.

    Alright, while using the CSS Validator:
    HTML Code:
    Sorry! We found the following errors (1)
    URI : [url]http://idacomusa.com/joomla/templates/jv_bellus/css/jv_css.php[/url]
    0 		Parse Error Lexical error at line 1, column 6. Encountered: ">" (62), after : "<br /"

    The text above shows the error returned. To me, it seems the problem is within the PHP file. I know HTML, learning CSS, and have no clue about PHP. Would someone please clarify what the problem is for me? Maybe also show me what I need to fix? I'll provide more info if needed, just let me know what I forgot.

    Thanks ahead of time!!!!

  2. #2
    Join Date
    Mar 2010
    Posts
    2,803
    Is jv_css.php meant to contain css styles or php server side code?

    If you can, post the contents of jv_css.php and clarify what the file is meant to be used for (ie..css styles or server side processing of data).

  3. #3
    Join Date
    May 2010
    Posts
    4
    I am not sure what the point of this file is to be brutally honest. It was in the contents of the theme that I am currently using.

    Here is the site (if it helps):
    HTML Code:
    http://idacomusa.com/joomla
    Here is the contents of the .php file:

    HTML Code:
    <?php
    /**
    * @version 1.5.x
    * @package JoomVision Project
    * @email webmaster@joomvision.com
    * @copyright (C) 2008 http://www.JoomVision.com. All rights reserved.
    */
    
    require_once('../../../configuration.php');
    header("Content-type: text/css");
    $d = detect();
    $b = $d['browser'];
    $v = $d['version'];
    $o = $d['os'];
    function detect()
        {
        $browser = array ("IE","OPERA","MOZILLA","NETSCAPE","FIREFOX","SAFARI","CHROME");
        $os = array ("WIN","MAC","LINUX");
        $info['browser'] = "OTHER";
        $info['os'] = "OTHER";
        foreach ($browser as $parent)
            {
            $s = strpos(strtoupper($_SERVER['HTTP_USER_AGENT']), $parent);
            $f = $s + strlen($parent);
            $version = substr($_SERVER['HTTP_USER_AGENT'], $f, 5);
            $version = preg_replace('/[^0-9,.]/','',$version);
            if ($s)
                {
                $info['browser'] = $parent;
                $info['version'] = $version;
                }
            }
        foreach ($os as $val)
            {
            if (eregi($val,strtoupper($_SERVER['HTTP_USER_AGENT']))) $info['os'] = $val;
            }
        return $info;
        }
    
    ?>
    <?php 
    if (($b == 'CHROME')) {
    ?>
    /* CSS RENDER HERE FOR CHROME*/
    #jv-quicksearch .jv-k2search-wrap .preview {
    	overflow: visible !important;
    }
    #jv-quicksearch #search_results {
    	left: -1px !important;
    }
    /********************************/
    <?php    
    }
    ?>
    <?php 
    if (($b == 'OPERA') || $jvTools->browser() == 'OPE') {
    ?>
    /* CSS RENDER HERE FOR OPERA*/
    #jv-quicksearch .jv-k2search-wrap .preview {
    	overflow: visible !important;
    }
    #jv-quicksearch #search_results {
    	left: -1px !important;
    }
    /********************************/
    <?php    
    }
    ?>

  4. #4
    Join Date
    Mar 2010
    Posts
    2,803
    I can't find the line in that code that generates your error message.

    Hopefully a Joomla guru will be able to help more.

  5. #5
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    This is throwing an error:
    Code:
    if (($b == 'OPERA') || $jvTools->browser() == 'OPE') {

  6. #6
    Join Date
    May 2010
    Posts
    4
    Thanks for trying tirna, I really appreciate it.

    Fang, can I just remove that line of code? Or will that make the site unviewable through Opera?

  7. #7
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    You can, temporarily remove
    Code:
    if (($b == 'OPERA') || $jvTools->browser() == 'OPE') {
    The solution is to contact webmaster@joomvision.com
    In any case the problem is PHP

  8. #8
    Join Date
    May 2010
    Posts
    4
    I opened this up in Ad0be Dr3amweaver and was able to identify the issues. Thanks for both of your help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles