Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Learn More

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

percentage-based vertical positioning dependent on block width?

  • 1 відповідь
  • 6 мають цю проблему
  • 1 перегляд
  • Остання відповідь від schwal

more options

I seem to have found an issue when firefox is positioning blocks based on percentage values and margin offsets.

in short, look at this page: http://akos.maroy.hu/~akos/frontend/experiment/awake.html

the intended size of the image section is 75% of the available area, both vertically and horizontally. the intended location of the image section is so that the it's in the middle both vertically and horizontally.

while this works horizontally, it seems that the vertical position of the image depends on the horizontal width of the window. if one changed the width of the window, the image will shift vertically.

I seem to have found an issue when firefox is positioning blocks based on percentage values and margin offsets. in short, look at this page: http://akos.maroy.hu/~akos/frontend/experiment/awake.html the intended size of the image section is 75% of the available area, both vertically and horizontally. the intended location of the image section is so that the it's in the middle both vertically and horizontally. while this works horizontally, it seems that the vertical position of the image depends on the horizontal width of the window. if one changed the width of the window, the image will shift vertically.

Обране рішення

This is not exclusive to Firefox. Your problem is that margin-top uses "%" to mean "% of width". http://www.w3schools.com/cssref/pr_margin-top.asp

Читати цю відповідь у контексті 👍 1

Усі відповіді (1)

more options

Вибране рішення

This is not exclusive to Firefox. Your problem is that margin-top uses "%" to mean "% of width". http://www.w3schools.com/cssref/pr_margin-top.asp