Jump to content
  • 0

Не работает позиционирование


DmiUr
 Share

Question

Попытался поверстать один из выложенных здесь макетов, возникла проблема. При создании элемента (большой бардовой полоски) этот элемент не прилегает плотно к левой части экрана, есть отступ не предусмотренный в графическом макете. Вот ссылка на все это дело в fiddle:https://jsfiddle.net/jhcgof0b/  

Пытаюсь сделать так чтобы полоска вплотную прилегала к левому краю экрана через position:left, но элемент не сходит с места ни на пиксель. 

Вот сам макет который пытаюсь верстать:

P.S. Очень старался задать вопрос правильно, с учетом рекомендаций. Спасибо за понимание. 

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Добрый день.

У вас в  #line задан внешний отступ margin, со всех сторон.

margin: [all]; //Ваш случай
margin: [top bottom] [right left];
margin: [top] [right left] [bottom];
margin: [top] [right] [bottom] [left];

Используйте отступы, только где вам необходимо. Постарайтесь использовать class, а не id. У id высокий уровень специфичности.

Edited by dmitryiva
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