PDA

View Full Version : Chrome works but ie7 (AGAIN)


urbanrays
01-06-2009, 10:54 AM
I have placed a box on my site and used relative pos, the problemis in ie7 the text within the box is in the centre of the page and in chrome the box is virtually where i want it
www.urbanrays.co.uk (http://www.urbanrays.co.uk)

the code for the box is as follows
.homeprices {
height: 120px;
width: 275px;
border: medium solid #000000;
position: relative;
top: 10px;
left: 10px;
background-color: #000000;
right: 303px;
}

What is it with IE7??

edbr
01-06-2009, 11:00 AM
right: 303px;
top: 10px;
left: 10px; looks like attributes left over from an AP div use "margin-" before them

Corrosive
01-06-2009, 11:03 AM
right: 303px;
top: 10px;
left: 10px; looks like attributes left over from an AP div use "margin-" before them

He, he. Told you Ed would get it...I didn't think it'd be that quick though!

edbr
01-06-2009, 11:07 AM
im bored waiting for the trouble and strife!!

Corrosive
01-06-2009, 11:10 AM
im bored waiting for the trouble and strife!!

Every married man on the planet can relate to that!

edbr
01-06-2009, 11:13 AM
I put Jean luc Ponty on and suddenly its time to go !! funny that

urbanrays
01-06-2009, 11:17 AM
no that didnt work

Corrosive
01-06-2009, 11:20 AM
no that didnt work

You haven't done what Ed said (or at least on the uploaded version)

Still says this...

.homeprices {
height: 120px;
width: 275px;
border: medium solid #000000;
position: relative;
top: 10px;
left: 10px;
background-color: #000000;
right: 303px;
}

urbanrays
01-06-2009, 11:24 AM
Not upload yet mate just trying on pc mate

urbanrays
01-06-2009, 12:15 PM
its up now
Silly question, its not something wrong with the content div where the .homeprices sits in is it

Corrosive
01-06-2009, 12:46 PM
its up now
Silly question, its not something wrong with the content div where the .homeprices sits in is it

OK, you shouldn't really need to 'position' a relative div. It is kept in place by the flow of the site. You also shouldn't really specify a height. Set the height by adding padding the top and bottom of your box

domedia
01-06-2009, 12:59 PM
For development, always use validation to make sure there's no errors in your HTML/CSS that are causing problems.

The CSS rule for the block on your homepage has an error in it:
.homeprices {
height: 120px;
width: 275px;
border: medium solid #000000;
position: relative;
margin-top: 10px;
margin-left: 10px;
background-color: #000000;
margin-right: 303px;
;


}

Corrosive
01-06-2009, 01:01 PM
For development, always use validation to make sure there's no errors in your HTML/CSS that are causing problems.

The CSS rule for the block on your homepage has an error in it:
.homeprices {
height: 120px;
width: 275px;
border: medium solid #000000;
position: relative;
margin-top: 10px;
margin-left: 10px;
background-color: #000000;
margin-right: 303px;
;


}

Oh yes, you have a superfluous ; in it. You'll want to remove that! As Domedia says, validate your html and css at http://www.w3.org

urbanrays
01-06-2009, 01:01 PM
Corrosive i tried all that you suggested,even deleted .homeprices and started again but still doing exactly the same.

God knows what is going on here mate

Corrosive
01-06-2009, 01:10 PM
Corrosive i tried all that you suggested,even deleted .homeprices and started again but still doing exactly the same.

God knows what is going on here mate

Sorry mate. Am stumped as well. As I said earlier I find it reallly hard to debug code. I just haven't got 'the eye' for it when someone else has built a site.

urbanrays
01-06-2009, 01:22 PM
well god knows what i have done mate all i did was repair the faults as listed on w3, a.urbanlarge:active and it works now
and putfloat left on the box and it all works ok now

Thanks for all your help on this one guys
watch this space for many more ie7 faults