Author Topic: addtocart form/box sized differently in IE and Firefox  (Read 1203 times)

Joomgau

  • Jr. Member
  • **
  • Posts: 50
addtocart form/box sized differently in IE and Firefox
« on: October 18, 2010, 15:25:00 pm »
Hi all,
I realized that the addtocartbox in sized correctly in Firefox, but when using IE, the Box goes all the way from left to right, which is way too wide and doesn´t look pretty at all.
Any ideas how this could be fixed.
Thanks a lot!

alexanders

  • Jr. Member
  • **
  • Posts: 61
Re: addtocart form/box sized differently in IE and Firefox
« Reply #1 on: October 18, 2010, 22:01:52 pm »

Remove or use comments to disable:

  • width:100%; for .vmCartAttributes
  • float:left; for .vmCartChild (to keep quantity / Add to cart button below attributes)

in the file components/com_virtuemart/themes/default/theme.css

Assuming you have not edited the file before, the relevant sections could look like this:

Code: [Select]
...
.vmCartChild { /* Container for the Child Product */
vertical-align: middle;
border: 1px solid #000;
padding-left: 2px;
padding-right: 2px;
margin-bottom: 2px;
/* float:left;*/

}
...
.vmCartAttributes { /* Attributes Div*/
margin-top:8px;
/* width:100%;*/
}
...

This worked for me with Internet Explorer 6 and 7. Edit: Virtuemart 1.1.x was used.

Joomgau

  • Jr. Member
  • **
  • Posts: 50
Re: addtocart form/box sized differently in IE and Firefox
« Reply #2 on: October 19, 2010, 16:33:30 pm »
Thanks Alexanders. Unfortunately it didn´t work in my case. No matter if I deleted the entries you mentioned, or changed the values...nothing happened.
Do you have any other idea?
Thanks.

alexanders

  • Jr. Member
  • **
  • Posts: 61
Re: addtocart form/box sized differently in IE and Firefox
« Reply #3 on: October 20, 2010, 22:39:02 pm »
Joomgau, if you didn't already, try clearing your browser cache and/or use Ctrl+F5 when reloading the page, as CSS usually gets cached. If this doesn't solve it, in the same file, experiment with the CSS declarations under .vmCartContainer, .vmCartChild, .vmRowTwo, and .vmCartAttributes, since these seem to be the most likely cause of the problem. Try to remove any other float: declarations, except on .vmCartContainer. Remove width:100% declarations.

If you can't find a solution, providing more information is usually helpful - here I assumed you were using Virtuemart 1.1.x and the IE problems were with versions 6 and 7. Also, a reason behind this could be that you have modified these files before/use a different Virtuemart theme than 'default'/have made other modifications/also have these css selectors in other css files, like those for your Joomla theme. (Just guessing. )

alexanders

  • Jr. Member
  • **
  • Posts: 61
Re: addtocart form/box sized differently in IE and Firefox
« Reply #4 on: October 22, 2010, 20:16:35 pm »
This tries to address the same issue, with possible solutions:
http://forum.virtuemart.net/index.php?topic=58106.0

Joomgau

  • Jr. Member
  • **
  • Posts: 50
Re: addtocart form/box sized differently in IE and Firefox
« Reply #5 on: November 07, 2010, 09:10:31 am »
After ignoring the problem for a while (I was sick and tired of it), I came back and experimented with until I solved it - playing with the vmCartContainer values, as you suggested.
So thanks a lot for your help, alexanders!!

alexanders

  • Jr. Member
  • **
  • Posts: 61
Re: addtocart form/box sized differently in IE and Firefox
« Reply #6 on: November 07, 2010, 09:45:27 am »
Glad you got it to work, but what was the exact solution? (Could be useful for other people.)