4 Replies - 569 Views - Last Post: 17 July 2012 - 06:50 AM

#1 questions4code  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 17-July 12

Html/Css drop down shows differently in firefox

Posted 17 July 2012 - 06:16 AM

Attached ImageHello...i have an issue with firefox since is displaying my drop down menu differently...

My HTML code

<form name="form" id="form">
        <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
		
          <option>Select a publication</option>
          <option value="publications/1.pdf">Sample1</option>
          <option value="publications/2.pdf">Sample2</option>
          <option value="publications/3.pdf">Sample3</option>
		  
        </select>
	
		
      </form>


#jumpMenu{
	position:absolute;	
	width:262px;
	height:26px;
	line-height:26px;
	text-indent:10px;
	background:url(../images/drop_down.png) no-repeat 0 0;
	cursor:default;
	z-index:1;
}



It works ok in all browsers...except firefox..

Please see screenshot to see what i mean

If anyone has any idea why or how to fix this...Please share...

Many Thanks
q4c

Attached image(s)

  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: Html/Css drop down shows differently in firefox

#2 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 994
  • View blog
  • Posts: 3,547
  • Joined: 05-June 09

Re: Html/Css drop down shows differently in firefox

Posted 17 July 2012 - 06:22 AM

What isn't displaying correctly?

You can't style a dropdown in pretty much any way at all, as it's drawn completely per-browser. You can of course position it etc, but can't expect your background-image to work, a background-color may work, but not guaranteed.

If you want it to look the same in all cases, create a Javascript-based dropdown system. This would generally involve some hidden divs that you show upon clicking the "dropdown", and then update a hidden field with the selected value.
Was This Post Helpful? 0
  • +
  • -

#3 questions4code  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 17-July 12

Re: Html/Css drop down shows differently in firefox

Posted 17 July 2012 - 06:32 AM

View PostRudiVisser, on 17 July 2012 - 06:22 AM, said:

What isn't displaying correctly?

You can't style a dropdown in pretty much any way at all, as it's drawn completely per-browser. You can of course position it etc, but can't expect your background-image to work, a background-color may work, but not guaranteed.

If you want it to look the same in all cases, create a Javascript-based dropdown system. This would generally involve some hidden divs that you show upon clicking the "dropdown", and then update a hidden field with the selected value.



Hi..thanks for your answer...

Already tried background color...but it didnt work. Do you have a sample tutorial for creating a Javascript-based dropdown system?

Thank you for your help
Was This Post Helpful? 0
  • +
  • -

#4 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 994
  • View blog
  • Posts: 3,547
  • Joined: 05-June 09

Re: Html/Css drop down shows differently in firefox

Posted 17 July 2012 - 06:45 AM

Well if you don't know Javascript already, then you might aswell use one of these 10 jQuery plugins for creating dropdowns.
Was This Post Helpful? 0
  • +
  • -

#5 questions4code  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 17-July 12

Re: Html/Css drop down shows differently in firefox

Posted 17 July 2012 - 06:50 AM

View PostRudiVisser, on 17 July 2012 - 06:45 AM, said:

Well if you don't know Javascript already, then you might aswell use one of these 10 jQuery plugins for creating dropdowns.


Excellent ,...will have a look! Thank you for your time and help!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1