• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Problems with CSS external syle sheets again.

Dixter

Amateur Web Developer
Joined
Mar 31, 2009
Messages
660
Reaction score
11
Yea I seem to be having some wierd issues again. This started last night, I wanted to change the padding on the navigation bar (you know the a:link a:visited etc...) and for some reason it didn't change. Then this morning when I opened up my test page it changed. I tried making the padding bigger again it wouldn't change again. I'm doing all of this in Firefox. Then I created a class for the <p> tags to make the text red. That didn't work. But when I opened up Internet Explorer it was the padding I wanted and the text was red. However when I changed it again it wouldn't change. Please help with this.

Here's my index.php:

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Scorpia</title>
<link rel="stylesheet" type="text/css" href="./TEST.css"/>
<script type="text/javascript">
function show_alert() 
{
alert("Why do people always press the button they are told not to push?");
}
</script>
<script type="text/javascript">
var d = new Date();
var time = d.getHours();
if (time<10)
{
alert("Good Morning")
}
else
{
alert("Good Day")
}
</script>
</head>

<body>
<h1 class="a">HELLO WORLD!</h1>
<br />
<p class="r">Hello World</p>
<div class="b">
<ul class="a">
<li class="a">
<a class="a"href="http://www.w3schools.com/html/default.asp">HTML</a></li>
<li class="a"><a class="a"href="http://www.w3schools.com/css/default.asp">CSS</a></li>
<li class="a"><a class="a"href="http://www.w3schools.com/js/default.asp">JavaScript</a></li>
<li class="a"><a class="a"href="http://www.w3schools.com/xml/default.asp">XML</a></li>
</ul>
</div>
<br />
</br>
</br>
<input type="button" onclick="show_alert()" value="Do NOT press this button!" />
</body>
</html>

And here's my style sheet, TEST.css:

Code:
body 
{
background-color:blue;
} 

ul.a
{
list-style-type:none;
margin:0;
padding:0;
overflow:hidden;
}

li.a
{
float:left;
}


a.a:link,a.a:visited
{
display:block;
width:120px;
font-weight:bold;
color:white;
background-color:#98bf21;
text-align:center;
padding:2px;
text-decoration:none;
text-transform:uppercase;
}

a.a:hover,a.a:active
{
background-color:#7A991A;
}

h1.a
{
text-align:center;
}

div.b
{
 margin-left:376px;
 margin-right:376px;
}

img.g
{
position:absolute;
left:188px;
top:0px;
z-index:-1;
outline-style:solid;
outline-color:red;
outline-width:4px;
}

p.r
{
color:red;
}


I'll give rep for help.

EDIT:I just put body background in TEST.css too, I'm having the same problem still.
 
Last edited:
It seems to be delaying. Because the text JUST turned red. WTF is wrong, it takes like an hour or more for the changes to actually take place? wtf?

EDIT: The padding just changed like 15 min after I edited it. WTF is going on?
 
Last edited:
Try to attribute the b class
b{
value: value;
}

Should this be in index.php or TEST.css? And how does this attribution work? I'm still fairly new to web development so if you could explain how this attribution works? Thanks REP++
 
It adds a style to the whole b class . U have it in a DIV.

PHP:
<div class="---------b---------">
<ul class="a">
<li class="a">
<a class="a"href="http://www.w3schools.com/html/default.asp">HTML</a></li>
<li class="a"><a class="a"href="http://www.w3schools.com/css/default.asp">CSS</a></li>
<li class="a"><a class="a"href="http://www.w3schools.com/js/default.asp">JavaScript</a></li>
<li class="a"><a class="a"href="http://www.w3schools.com/xml/default.asp">XML</a></li>
</ul>
</div>
 
Back
Top