elexion Posted November 10, 2009 Share Posted November 10, 2009 hey everyone, I've been having a little issue with my CSS files. I've included them into my files but whenever i go to another part of my website the CSS file doesnt load with it until i hit the refresh button. Any thoughts on this little issue? Link to comment Share on other sites More sharing options...
Synook Posted November 10, 2009 Share Posted November 10, 2009 What browser is this in? A link would be good too. Link to comment Share on other sites More sharing options...
elexion Posted November 10, 2009 Author Share Posted November 10, 2009 running on internet explorer 7. what link would you like to see? the part where i include the stylesheets or to links from page to page? Link to comment Share on other sites More sharing options...
Synook Posted November 10, 2009 Share Posted November 10, 2009 I mean, a link to the actual site in question. Also, have you tried clearing your cache? Link to comment Share on other sites More sharing options...
elexion Posted November 10, 2009 Author Share Posted November 10, 2009 I mean, a link to the actual site in question. Also, have you tried clearing your cache?sorry, clearing my cache? Link to comment Share on other sites More sharing options...
Synook Posted November 10, 2009 Share Posted November 10, 2009 sorry, clearing my cache?As in Tools > General > Browsing History | Delete... Link to comment Share on other sites More sharing options...
elexion Posted November 10, 2009 Author Share Posted November 10, 2009 As in Tools > General > Browsing History | Delete...thanks for the advice tried it but the is still could i have something to do with the fact that i dont include any style sheet in my menu.php(the navigation bar) page? Link to comment Share on other sites More sharing options...
thescientist Posted November 10, 2009 Share Posted November 10, 2009 thanks for the advice tried it but the is still could i have something to do with the fact that i dont include any style sheet in my menu.php(the navigation bar) page? that might be a start...how else would you expect that page to exhibit your styles without a link to your stylesheet? You might as well provide a code or link to your site as well. Link to comment Share on other sites More sharing options...
elexion Posted November 11, 2009 Author Share Posted November 11, 2009 i have a function included on every page that choses which lay-out to display. Maybe this is giving the problem since this function only tells what layout to choose but the menu bar is written in a different file and included after the function.Update:After going through my code i've found the function to be the problem. The issues has something to do with the way i currently have my if statements written For example:$switch = date("y/m/d");if ($switch==date("2009/11/09")) { ?> <div class="banner"> <img src="images\\standard_opmaak\\banner.jpg"/> </div> <?php echo "<link rel='stylesheet' href='style_standard.css' type='text/css'>"; }now the problem is the echo which is suppose to load the style sheet onto the page being loaded.Can anyone please give me a example on how to fix this or refference to a tutorial anything will do? Link to comment Share on other sites More sharing options...
Err Posted November 11, 2009 Share Posted November 11, 2009 if ($switch==date("2009/11/09"))If you're comparing today's date to a date in a string then this would be the proper way:if ($switch == "2009/11/09")I'm not totally sure about this, but there's certain keywords in PHP that you can't use. I know switch is one, but I suppose that if it's declared as a variable you'll be ok. Link to comment Share on other sites More sharing options...
elexion Posted November 11, 2009 Author Share Posted November 11, 2009 thanks for the input RahXephon,Right now i have the border lines from my css file showing in every pagemeaning it's working....a bit the issue now is that it's not showing the backgroundcolor which i applied to <body> Link to comment Share on other sites More sharing options...
Err Posted November 11, 2009 Share Posted November 11, 2009 Post your CSS here. (Please use the [b]code[/b][ /code] tags) Link to comment Share on other sites More sharing options...
elexion Posted November 11, 2009 Author Share Posted November 11, 2009 Post your CSS here.good idea body{background-color:#00FF00;}li{}a{}ul{background-color:#00FF00;list-style: none;border: 3px solid orange;margin: auto;width: 150px;float: left;font-size: 16px;}div.banner{width: 1181px;height: 234px;border-bottom: 3px solid orange;border-top: 3px solid orange;border-left: 3px solid orange;border-right: 3px solid orange;} hope this is any help my guess at the moment is that somewhere i my code i have a line that overwrites the stylesheets color Link to comment Share on other sites More sharing options...
thescientist Posted November 11, 2009 Share Posted November 11, 2009 you would know better than us. Do you have background-color for the <body> tag declared any where else? Maybe you should just show your entire .php page, because your stylesheet seems to be OK. Which elements are you getting borders on, because I think for your div.banner you might have to declare a border-style in order for the borders to show up. Link to comment Share on other sites More sharing options...
elexion Posted November 11, 2009 Author Share Posted November 11, 2009 you would know better than us. Do you have background-color for the <body> tag declared any where else? Maybe you should just show your entire .php page, because your stylesheet seems to be OK. Which elements are you getting borders on, because I think for your div.banner you might have to declare a border-style in order for the borders to show up.Well i do have the body tag declared in the other stylesheets but those are only loaded IF the statement is true.As for the banner i can see the borders on it just the background is giving issues at the moment.UPDATE:Problem solved. thanks for the help everyone. A valuable lesson taught Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.