Looking for CSS expert

Discussion in 'Programming' started by sandanista, Jun 22, 2007.

  1. #1
    I have a 3 column layout on my website.
    I need the central column making wider and the left and right columns making smaller - sounds simple right?
    Only problem is when I try to edit the css myself the layout looks fine in firefox, opera, and ie7, but it looks like crap in ie6. A LOT of my website visitors use ie6 so I need it to work for ie6 too. It may need a css hack to get it to work for ie6 so if you have experience with this then that is great.
    PM me if you are interested.
     
    sandanista, Jun 22, 2007 IP
  2. HuggyCT2

    HuggyCT2 Guest

    Messages:
    222
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Best course of action I would take is either use JS, or PHP to select a different css sheet depending on the browser or version. I have made a script for this for other clients I have worked for. It does not get the version but can be modded to do that quite easyily.

    
    <?php
    
    	/* Browser setter by Glen Hughes*/
    
    	if (strpos($_SERVER['HTTP_USER_AGENT'], "Firefox")) // Firefox
    		{
    		$browser = "FireFox";
    		$style = "ff.css";
    	}
    	if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE")) // IE
    		{
    		$browser = "Internet Explorer";
    		$style = "ie.css";
    	}
    	if (strpos($_SERVER['HTTP_USER_AGENT'], "Safari")) // Safari
    		{
    		$browser = "Safari";
    		$style = "safari.css";
    	}
    	if (strpos($_SERVER['HTTP_USER_AGENT'], "Opera")) // Opera
    		{
    		$browser = "Opera";
    		$style = "opera.css";
    	}
    	
    	if (!$browser || !$style) // Default
    		{
    		$browser = "Unknown";
    		$style = "default.css";
    	}
    
    	/* Just comment this part out or delete once you implement it in your page */
    
    	echo "Browser is " . $browser . "<br />"; // Prints the browser out
    	
    	echo "And the style is " . $style; // Prints the style out
    	
    	/* 
    	Now we can use this in the html and just echo what style we need,
    	in your head section where you are linking to the css sheets, just
    	use this code.
    	*/
    	
    	echo "<link href=\'" . $style . "'\ rel='stylesheet' type='text/css'/>";
    ?>
    
    PHP:
     
    HuggyCT2, Jun 23, 2007 IP
  3. PadraigCurran

    PadraigCurran Peon

    Messages:
    250
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    There are shorther hacks then that, which are just as effective.
     
    PadraigCurran, Jun 23, 2007 IP
  4. naturaldesigns

    naturaldesigns Member

    Messages:
    57
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    try to use conditional comments (google :) ) or contact me..^^

    regards
     
    naturaldesigns, Jun 23, 2007 IP