Jump to content
  • 0

Проблемы верстки =D


RodgerFox
 Share

Question

Уважаемые знатоки, я просто уверен, что многие из вас могли сталкиваться с такой проблемой. Нужно разместить блок с абсолютном позиционированием по середине дочернего блока, но вот дочерний блок резиновый как быть? Точнее хотелось бы узнать интересные решения...

У кнопочти хочу сделать треугольничек с закругленным краем использую after/before. А нормальный способ держаться середины не могу найти ~_~

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

top; 50%;

left: 50%;

margin-right: -Xpx; X- половина ширины элемента.

margin-top: -Ypx;

недостаток - если у тебя внутренний элемент изменит размеры то надо будит их прописывать по новой.

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