Title: Changing style sheets
Last modified: August 19, 2016

---

# Changing style sheets

 *  Resolved [flying-phil](https://wordpress.org/support/users/flying-phil/)
 * (@flying-phil)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/changing-style-sheets/)
 * I keep getting the following “Parse error: syntax error, unexpected ‘<‘ in” in
   the code below. I’m trying to switch style sheets depending on the browser type..
 * here’s the code:
 *     ```
       if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) {
   
       <link rel="stylesheet" href="http://magicdea.homeip.net/wp-content/themes/Magicdea/style_ie.css" type="text/css" media="screen" />;
   
       }else{
   
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />;
       ```
   
 * Can anyone help??
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [jarretcade](https://wordpress.org/support/users/jarretcade/)
 * (@jarretcade)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/changing-style-sheets/#post-989842)
 * You are already inside of the PHP tags yet you are trying to use plain HTML without
   setting the HTML up inside of a variable. You need to do something like the following.
 *     ```
       <?php if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) { ?>
   
       <link rel="stylesheet" href="http://magicdea.homeip.net/wp-content/themes/Magicdea/style_ie.css" type="text/css" media="screen" />
   
       <?php } else { ?>
   
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
   
       <?php } ?>
       ```
   
 *  Thread Starter [flying-phil](https://wordpress.org/support/users/flying-phil/)
 * (@flying-phil)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/changing-style-sheets/#post-989905)
 * Thanks that fixed it!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Changing style sheets’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [flying-phil](https://wordpress.org/support/users/flying-phil/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/changing-style-sheets/#post-989905)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
