Jump to content

CSS positioning in IE problem


Fukushousha

Recommended Posts

Hello all,I am trying to figure out how to position all the div's of my website with CSS. I did something like this :

#pageLogo {	position:absolute;	background-image: url(NATLOGO1.jpg);	background-repeat: no-repeat;	background-position:center;	left: 10px;	top: 10px;	width: 200px;	height: 144px;	top: 7px;}#pageHead{	position: absolute;	background-image: url(headrect1.jpg);	background-position:center;	background-repeat: no-repeat;	left: 210px;	top:7px;	width:617px;	height: 145px;}

The idea is to position the logo left of the pageheader and this way make them look like one and take all the top part of the page.The problem is that even though this works like a charm in firefox in IE it gets messed up. Specifically it shows the pageHead div underneath the pageLogo div and not right next to it as it was supposed to do.What is the way to fix this? Any help would be really appreciated. :)EDIT: Ofcourse please do advice me if my way of positioning is inaproriate, unprofessional or anything bad in general. If I should position everything in another better way please do not hesitate to mention it. Thanks in advance again.

Link to comment
Share on other sites

#pageLogo {	position:absolute;	background-image: url(NATLOGO1.jpg);	background-repeat: no-repeat;	background-position:center;	left: 10px;	top: 10px;	width: 200px;	height: 144px;	top: 7px;}}

Do you have this posted somewhere that it can be viewed?One thing I noticed is that you have top defined twice, this isn't your problem but should be corrected.Mike
Link to comment
Share on other sites

Do you have this posted somewhere that it can be viewed?One thing I noticed is that you have top defined twice, this isn't your problem but should be corrected.Mike
Thanks for your input Mike, I will be sure to correct it. Actually I just got home and re-checked the ie-firefox view of the site. A pleasant yet unexplicable surprise was waiting. It looked ok in both. Even though the very same morning I had the problem described above. The only difference is that some very small parts of the images were transparent and in IE this does not seem to appear so, even though this must be another topic alltogether.Closing, I just want to ask if this is indeed the way to position elements with CSS? Is absolute positioning what is preferred or should another option be chosen?
Link to comment
Share on other sites

Hi, I dont recomend you to use absolute positioning, use relative in my opinion is the best :). You can have many problems with the position absolute..Complements \o/

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...