2 Replies - 344 Views - Last Post: 05 February 2012 - 09:19 AM

Topic Sponsor:

#1 Viper2KX  Icon User is online

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 71
  • Joined: 25-January 09

Odd Bug with Firefox and Opera Only

Posted 04 February 2012 - 10:02 PM

I am running Firefox 10.0 and Opera 11.61 for this to show. This is a LABEL bug that I have wrapped in SPAN just so the form looks nice without TABLE.

Its hard to explain, so here is a picture:
Attached Image

Then without the LABEL bug:
Attached Image

Error-less code...
HTML:
<span>
  <label for="pst">Provence/State/Territory</label>
</span>
<br />
<input name="" type="text" id="pst" />



CSS: (Just in case if someone was curious)
.formRow span label {
    position: absolute;
    left: 10em;
}



Javascript: none, I am using the Dojo Toolkit.

I honestly have no idea where to begin. I am seeking assistance to get the LABEL to not <br /> like it automatically does with FF and Opera.

Thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: Odd Bug with Firefox and Opera Only

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 2147
  • View blog
  • Posts: 5,430
  • Joined: 08-June 10

Re: Odd Bug with Firefox and Opera Only

Posted 05 February 2012 - 02:55 AM

my guess would be that the text exceeds the label’s width and therefore it uses 2 lines (you can easily verify that in Firebug) and since it is absolute it ovelaps the next element.

actually, I don’t see why you need to wrap the label in a span and make it absolute as well …
Was This Post Helpful? 0
  • +
  • -

#3 Viper2KX  Icon User is online

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 71
  • Joined: 25-January 09

Re: Odd Bug with Firefox and Opera Only

Posted 05 February 2012 - 09:19 AM

Fixed it, just had to go to w3schools to and look up the positioning.

New CSS code:
.formRow span label {
    position: relative;
    left: -0.1em;
}



If I had removed 'left:' completely, the label(s) would be indented.

Quote

I don’t see why you need to wrap the label in a span

I had to because I had another completely set of different labels. So without the span surrounding this set, they all would have overlapped.

I just visually saw this as a sub-menu type of deal.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1