Forums / General Questions / change size of the "Dropdown Menu"

change size of the "Dropdown Menu"

Locked

Views: 1,093

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
29 Nov 2010, 9:56 PM
#1
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

change size of the "Dropdown Menu"

Hi!

Does anyone know if it's possible to change (preferably lock) the size of the dropdown menu..?

Thanks/Jacob

29 Nov 2010, 10:14 PM
#2
paul69 avatar

paul69

Zen Follower

Join Date:
Jan 2010
Posts:
124
Plugin Contributions:
0

Re: change size of the "Dropdown Menu"

Need a little more information...

What menu, where is it, maybe a url to take a look? Most settings can be done in a css file however more info is needed.

29 Nov 2010, 10:32 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: change size of the "Dropdown Menu"

Now that we can see it, which dropdown do you mean? "Tillverkare"?
And how do you mean "change the size"? Make it a fixed menu display of all the items instead of a dropdown?

29 Nov 2010, 10:47 PM
#5
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: change size of the "Dropdown Menu"

Hi gjh42! Thanks for also having a look at this. I found out that I could "lock" the position of the element (Dropdown Menu) by setting the width of "attribsSelect" so the Dropdown wouldn't move around (or rather move to the left) based on it's size.. here's comes the charming part.. it's not possible to press the Dropdown Menu (it's like frozen..) :yes:

Forgot to mention, we're talking about the Dropdown Menu on the tpl_product_information_display.

/Jacob

29 Nov 2010, 11:13 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: change size of the "Dropdown Menu"

To keep the select or dropdown box positoioned the same distance from the left edge no matter what the length of the name, add to your stylesheet

h4.optionName {width: 106px;}

or whatever you want. This will apply to all attributes, not just ones with a label of class .attribsSelect.

The dropdown appears to be frozen because you have used big negative margin-top and padding-top to move #cartAdd around. Change those to smaller dimensions and the dropdown will no longer be screened.

29 Nov 2010, 11:19 PM
#7
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: change size of the "Dropdown Menu"

Ok. Thanks.. I'll try that.. is 106px some sort of standard?? 'Cause I've seen it on some other sites.. thanks!

Will I be able to keep the lay-out if I use smaller margins for the add-to-cart button?/Jacob

29 Nov 2010, 11:24 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: change size of the "Dropdown Menu"

Not at all. It may correspond to some common em size, but has no significance, beside being right in the range that will usually give good results. I used it because it was already in your CSS. On my own, I would have said 100px or 10em.

29 Nov 2010, 11:34 PM
#9
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: change size of the "Dropdown Menu"

I missed that part where 106px was already in my css (that's what happens when you're too ######..) referring to all the #### are we not allowed to write g@y here??

Can I ask why you wrote this particular part of code without a space ('h4.optionName')??

/JAcob

29 Nov 2010, 11:44 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: change size of the "Dropdown Menu"

The forum has spam/pron filters that automatically censor certain words (even if they are actually just part of a completely different word). Kind of annoying sometimes.

The absense of a space there is essential to the meaning.
h4.optionName would mean "h4 elements with class optionName".
h4 .optionName would mean "elements with class optionName inside an h4".

29 Nov 2010, 11:49 PM
#11
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: change size of the "Dropdown Menu"

Thanks. It would have taken me quite long to figure that out for myself so thanks. I've worked my site for seven months now [being both more and less active during this time] and it had not been possible without tips like these.. :D

29 Nov 2010, 11:57 PM
#12
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: change size of the "Dropdown Menu"

Great! You just solved the issue with the frozen "Dropdown Menu" and without any major changes to the lay-out.

I don't now what I was thinking writing that code... (maybe it was something #####..)