Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you target Google Chrome?

I need to position this update button on www.euroworker.no/order (you'll have to add an item to the cart, use the Kjøp button to add and Handlevogn to view the cart). Works in FF and IE. (Although there is another alignment problems with IE) but not in Chrome or Safari. I had it working before, but the only thing I can think of to do is target safari and Chrome. Is this possible?

Here's the CSS and HTML(Smarty) for you.

HTML(Smarty):

    {capture assign="cartUpdate"}

     <div id="cartUpdate"><!--<input type="submit" class="submit" value="{tn _update}" />-->
     <button type="submit" class="submit" id="oppdatersubmit" name="saveFields" title="Oppdater" value="">&nbsp;</button> </div>
    {/capture}
    {assign var="cartUpdate" value=$cartUpdate|@str_split:10000}
    {php}$GLOBALS['cartUpdate'] = $this->get_template_vars('cartUpdate'); $this->assign_by_ref('GLOBALS', $GLOBALS);{/php}

    {form action="controller=order action=update" method="POST" enctype="multipart/form-data" handle=$form id="cartItems"}

CONTENT

{/form}

And the CSS:

#oppdatersubmit {
 background-image:url(../../upload/oppdater.png);
 background-repeat:no-repeat;
 background-position:left;
 background-color:none;
 border:none;
 overflow:hidden;
 outline:none;
    white-space: nowrap;
 width:77px;
 height:25px;
 cursor:pointer;
 position:absolute;
}

#cartUpdate {
 position:absolute;
 width:160px;
 height:30px;
 left:580px;
 bottom:130px;
}

Need to change these for Chrome and Safari.

Thanks.

like image 813
Kyle Avatar asked Mar 15 '10 13:03

Kyle


People also ask

Why you should not use Google Chrome?

The more tabs that you have open, the slower your browsing will be. Chrome flips that onto its head and dedicates the same amount of RAM to each tab. Your browsing is faster, but your computer's performance suffers. Then there is the plethora of security issues and website tracking that Chrome subjects its users to.

Is Chrome owned by China?

Chrome is not a Chinese app. But many Chinese tech companies use the same open-source technology to develop their own version of web browsers.

What is the goal of Google Chrome?

Chrome is designed to be the fastest web browser. With one click, it loads web pages, multiple tabs, and applications with lightning speed. Chrome is fitted with V8, a faster and more powerful JavaScript engine. Chrome also loads web pages faster by using the WebKit open source rendering engine.


1 Answers

@media screen and (-webkit-min-device-pixel-ratio:0) {

    /*Chrome CSS here*/

    #cartUpdate {
        position:absolute;
        width:160px;
        height:30px;
        left:660px;
        bottom:40px;
    }
}

Fixed the problem :)

UPDATE

This resource works better: CSS browser/OS selectors with JS.

like image 92
Kyle Avatar answered Oct 23 '22 00:10

Kyle