7 replies [Last post]
Subplastic
Offline
Regular
Last seen: 16 years 13 weeks ago
Joined: 2004-06-30
Posts: 13
Points: 0

I know thats a bad move, but everytime i go to create something, end up having a big drama with getting it looking fine on all the different browsers

today i tried make a mouseover link.

Now firstly, IE adds like 10 px between the <h1> and the link tag.
The problem doesnt exist in firefox or netscape, the link is flush up agaist the header text, like it should be.

The 2nd problem is that the a:hover works fine in IE for the first time, but when you click refresh, it doesnt work, and reverts to the a:visited attribute

If someone could help me with this, i seriously carnt see my error, and i'm about to go crazy.

The problem is on this page :
http://www.subplastic.com/css/index.html

cheers
lee

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 37 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

About to give up on css..........

For starters remove the fiirst line <?xml version>(it's not required) this does tend to get repeated quite often but that line is throwing IE6 into quirks mode as it can't understand it and stumbles. Do that then see how things are behaving.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Subplastic
Offline
Regular
Last seen: 16 years 13 weeks ago
Joined: 2004-06-30
Posts: 13
Points: 0

About to give up on css..........

I took it out just then, and theres no difference unfortunately Sad

The Finch
Offline
Enthusiast
Cincinnati
Last seen: 16 years 8 weeks ago
Cincinnati
Timezone: GMT-5
Joined: 2004-08-01
Posts: 65
Points: 0

About to give up on css..........

Quote:
The 2nd problem is that the a:hover works fine in IE for the first time, but when you click refresh, it doesnt work, and reverts to the a:visited attribute

Try changing the value of the link to something other than <a href="#">.

The Finch
Offline
Enthusiast
Cincinnati
Last seen: 16 years 8 weeks ago
Cincinnati
Timezone: GMT-5
Joined: 2004-08-01
Posts: 65
Points: 0

About to give up on css..........

Quote:
Now firstly, IE adds like 10 px between the <h1> and the link tag.
The problem doesnt exist in firefox or netscape, the link is flush up agaist the header text, like it should be.

It may help to enclose your link within some tag (e.g. <h1>, <h2>, <p>)

...
h1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-weight: normal;
	color: #999999;
	margin: 0px;
	padding: 0px;
}
h2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-weight: normal;
	color: #999999;
	margin: 0px;
	padding: 0px;
}
...
<div id="footer">
<h1>All content and images &copy; </h1>
<h2><a href="cheese">Client login area</a></h2>
</div>

Subplastic
Offline
Regular
Last seen: 16 years 13 weeks ago
Joined: 2004-06-30
Posts: 13
Points: 0

About to give up on css..........

yeah when i change the href to something other than #, the refresh problem with ie goes away thankgod.

Padding issue is still there though Smile

thanks for your help so far guys

lee

chris hester
Offline
Regular
UK
Last seen: 16 years 46 weeks ago
UK
Joined: 2003-11-07
Posts: 21
Points: 0

About to give up on css..........

Quote:
The 2nd problem is that the a:hover works fine in IE for the first time, but when you click refresh, it doesnt work, and reverts to the a:visited attribute

You need to style the visited hover as well. Er... except IE can't show both hover states at once. (It works in other browsers.)

Eg:
:visited:hover {color:#f00;}

IanCube
IanCube's picture
Offline
Regular
NY
Last seen: 16 years 7 weeks ago
NY
Timezone: GMT+5
Joined: 2004-08-09
Posts: 19
Points: -1

About to give up on css..........

Don't give up, the community here is great and I'm sure all your problems will be solved! Cool