views:

183

answers:

2

Hi, I have a button as made for you to see here. Looks fine,right? Well on the live site, euroworker.no/shipping and /selectAddress it seems stretched.

Renders fine in Chrome, IE and Safari, I thought it might have been a FF issue, but loaded the fiddle into FF and seems fine.

Quick ref CSS and html:

#fortsett_btn  {
   background-image: url(http://euroworker.no/public/upload/fortsett.png?1269434047);
   background-repeat:no-repeat;
   background-position:left;
   background-color:none;
    border:none;
    outline:none;
   visibility: visible;
   position: relative;
   z-index: 2;
   width: 106px;
   height: 25px;
   cursor:pointer;
}​

And HTML

<button type="submit" class="submit" id="fortsett_btn" title="Fortsett" value="">&nbsp;</button>​

I wonder what's up with it.

+1  A: 

Instead of

<button type="submit" class="submit" id="fortsett_btn" title="Fortsett" value="">&nbsp;</button>

Try this :

<button type="submit" class="submit" id="fortsett_btn" title="Fortsett" value="">Some value</button>

then add text-indent:-999px; to your CSS

This has nothing to do why your button is unaffected on live site, its just suggestion. You button doesn't style probably because you're missing a style sheet(wrong link), try styling it inline, then if it works copy the style to the style sheet

c0mrade
Thanks, will add this to the sheet.
Kyle Sevenoaks
Actually seemed to fix it.
Kyle Sevenoaks
+1  A: 

I'm not sure I understand the problem. The CSS is different in each case. On Fiddle you have a single image with a background-repeat set to no-repeat. On the live site you have a slice of a different image with background-repeat set to repeat-x. Those are two different ways of styling the button.

Fiddle:

#fortsett_btn {
background-image:url("http://euroworker.no/public/upload/fortsett.png?1269434047");
background-position:left center;
background-repeat:no-repeat;
border:medium none;
cursor:pointer;
height:25px;
position:relative;
visibility:visible;
width:106px;
z-index:2;
}

Live:

#product___specField_8  {
-moz-border-radius:5px 0 0 5px;
background-image:url("stylesheet/frontend/../../upload/orng_bg.png?1269434608");
background-repeat:repeat-x;
border:1px solid #DDDDDD;
float:left;
font-size:24px;
font-weight:bold;
height:33px;
padding-left:55px;
width:124px;
}

Why wouldn't you expect to see something different?

Robusto
@Robusto Indeed a dark secret that only fire-bug can tell :D
c0mrade
Those are two different IDs. 1: #fortsett_btn, my button.2: #product__specfield_8, my customised input field.:)
Kyle Sevenoaks
@Kyle: I just examined the "orange" button on each page. The one on the second page was longer (i.e., "stretched") so I assumed that's what you were talking about. The fact that they were different IDs doesn't necessarily mean anything because one was a sandbox with simplified sample code and the other was live.
Robusto
I understand what you were aiming at, just you got some ids confused, they're both calling the same ID; fortsett_btn.
Kyle Sevenoaks
@Kyle Sevenoaks `they're both calling the same ID` , you mustn't let that happen, ID are unique per document, you can use same class on multiple elements
c0mrade
I realise this, but didn't know it also applied to the same element on two different pages, thanks.
Kyle Sevenoaks