문제

I have noticed that my three absolutely positioned divs with text inside are positioned one way in internet explorer and firefox and slightly different in chrome and safari. What is the reason and solution for this?

They are positioned like this

 style="position: absolute; left: 100px; top: 270px; width: 499px;"

and are inside a relatively positioned element.

The page with the problem can be found here. The issue is with the three text groups on the left next to the number images.

도움이 되었습니까?

해결책

It looks like there is some problem with the font sizes being rendered in Chrome and FF. The text is not aligned with the numbers because in chrome and IE8 the h1 content comes in two lines where as in FF it is in single line. And i am no expert to say why this is happening.

To fix this try giving giving a smaller font size to the h1, for eg:

<h1 style="position:relative;top:-15px; font-size:30px; line-height:34px;">How to Make Your First Website</h1>

I suggest you to avoid inline styling in your html, instead write the styles in your CSS because it makes easy for you to change the styles

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top