Jump to content
  • 0

Позиционирование :after-блока относительно table-cell


Kray Storm
 Share

Question

Играюсь с менюшкой со всем известного макета level3 с divhack.

Там нужно под каждым пунктом меню разместить треугольный указатель.

С фиксированным вариантом все замечательно: генерим через :after блок, поворачиваем, и позиционируем относительно самого пункта меню.

Получается что-то такое.

Резиновый вариант меню решил сделать на таблице, но тут старый подход ведет себя иначе.

По идее, каждый <a> должен генерить по блоку-указателю, который смещаем на 50% от ширины каждого же <a>.

Подскажите пожалуйста, тут какой-то нюанс с таблицами, или я просто что-то банально пропустил и не вижу?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

http://jsfiddle.net/mrnobody/fGg5d/1/

В FireFox't не работает, там позиционируются элементы относительно таблицы ,а не ячеек (

Скорее всего нужно создавать контейнеры в ячейках и позиционировать псевдоэлементы относительно них.

Edited by mrnobody
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy