我需要将此更新按钮放在www.euroworker.no/order上(您必须将一个项目添加到购物车中,使用Kjøp按钮添加并使用Handlevogn来查看购物车).在FF和IE工作. (虽然IE还有一个对齐问题),但Chrome或Safari中却没有.我以前有工作,但我唯一可以想到的是瞄准Safari和Chrome.这可能吗?
这是CSS和HTML(Smarty)为您.
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=""> </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}
和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;
- }
需要更改这些Chrome和Safari.
谢谢.
解决方法
- @media screen and (-webkit-min-device-pixel-ratio:0) {
- /*Chrome CSS here*/
- #cartUpdate {
- position:absolute;
- width:160px;
- height:30px;
- left:660px;
- bottom:40px;
- }
- }
修复了问题:)
UPDATE
这个资源更好:CSS browser/OS selectors with JS.