making middleDiv work on phones