PDA

View Full Version : CSS Issue positioning



yannibmbr
Mar 15th, 2009, 01:33 AM
Hey there,
So I'm having an issue with some css positioning. On the site: http://dev.karmel.com (http://karmel.com) I have a search box in the top right of the page. In firefox and safari the box is positioned as I think it should be. However, in IE7, it displays above where I would expect it to.
Below is the snippet of CSS I used. I've tried both the absolute and relative positioning elements to no avail.


#wrapper #header #search {
width: 205px;
position: absolute;
height: 25px;
padding-top: 50px;
padding-left: 737px;
}

Any tips would be appreciated.
Thank you.

Fisher
Mar 15th, 2009, 07:31 AM
Firstly, your link is fudged. That's probably one of the reasons you haven't received any response. The page you linked to doesn't have a search box in the top right.

Now, for such a little search box, you're using a huge div which almost covers the header. Use margin and absolute positioning, not padding.

Try this:

#wrapper #header #search {
height:25px;
width:205px;
margin-left:737px;
margin-top:50px;
position:absolute;
}


That works in IE6 and FF3, so it should be okay.

yannibmbr
Mar 15th, 2009, 06:19 PM
Thank you so much for your help! My brain was kinda frazzled by the time I'd written that post... =) Should have gone to bed first. And, yeah, your code worked like a charm.

If you ever become the president of anything, I'm voting for you and giving you all of my Sacajawea Dollars!