Forum Moderators: not2easy

Message Too Old, No Replies

Index page help

CSS coding loss when returning to home page

         

greglynes

1:12 pm on Oct 4, 2006 (gmt 0)

10+ Year Member



Maybe a daft question but i am at a loss of what to do! and very new to this.

When i access my site - www.example.co.uk - the CSS code works fine for the text, if you go into the site and come back to home calling the index.htm file the css code is lost and the text reverts back to default.

Since these two files are the same file why the difference?

[edited by: SuzyUK at 6:49 am (utc) on Oct. 6, 2006]
[edit reason] removed site specifics per TOS #13 [/edit]

icantthinkofone

1:29 pm on Oct 4, 2006 (gmt 0)

10+ Year Member



<style> elements are to be placed in the <head> area only.

greglynes

1:38 pm on Oct 4, 2006 (gmt 0)

10+ Year Member



Which one isn't?

told you i was new to this?

penders

2:10 pm on Oct 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I was just having a look myself, and yes <style>...</style> sections should certainly be limited to the <head> section or an external CSS file. The page is not valid with them where they are... inside your navigation list...

<ul id="p7PMnav"> 
<li><a href="index.htm">Home</a> </li>
<li><a href="armor.htm">Armor Cottage</a> </li>
<li><a href="broons.htm">Broons Cottage</a> </li>
<li><a href="caulnes.htm">Caulnes Cottage</a> </li>

<li><a href="dinan.htm">Dinan Cottage</a> </li>
<li><a href="ereac.htm">Ereac Cottage</a>
<style>#p7PMnav a{height:1em;}#p7PMnav li{height:1em;float:left;clear:both;width:100%}</style>
<style>#p7PMnav li{clear:none;}</style>
</li></ul>

The section in bold should at least be moved to the <head> section and given a type (<script type="text/css">) - On the other hand you should perhaps consider making the changes directly to "p7pmv3.css" instead overriding the styles with an embedded stylesheet.

However, I don't think this is your problem. It seems to work OK on my IE6. I guess you using IE? I suspect it could be a cache problem - have you tried clearing your browser cache?

Also, your navigation menu is not working correctly in Firefox - the height of your <li> nav bars is not enough for this browser.