Login | Register | FAQ
Anonymous

My text color changed when clicked on in browser

+ Post a reply

3 posts Page 1 of 1


My text color changed when clicked on in browser

by maddie0949 » Fri Jun 08, 2012 3:29 pm

I've been designing a html page and I had everything set up to be the right colors, but I happened to click an image on my page while previewing it in the browser and it turned all of my text yellow and underlined, almost as if it were a hyperlink. I closed out of my browser and tried to reopen the file but the changes were still there. I checked the colors on the CSS document and they are the same as the ones I originally selected. Nothing looks like it's changed in the code, but every time I preview it on my browser the text is viewed as a link.

Any ideas?
User avatar

maddie0949

  • Posts: 2
  • Joined: Fri Jun 08, 2012 3:19 pm

Re: My text color changed when clicked on in browser

by maddie0949 » Fri Jun 08, 2012 3:36 pm

My HTML Code


<html>
<head>
<title>Maddie Huddle Art</title>
<link href="untitled text 2.css" rel="stylesheet" type="text/css">
</head>

<body>

<div class=container>

<p id="logo"><a href="#"><img src="file:///Users/mhuddle0949/Desktop/Html/Images/Logo.png">
</p>

<div>
<ul id="nav">
<li>Drawings</li>
<li>Paintings</li>
<li></li>
<li>More</li>
<li>About/Contact</li>
</ul>
</div>

<div>

<h1>Well hellooooo everybody</h1>
<p>Don't be alarmed. This is a test page. Wait-what are you doing?!?!?!?! Don't touch the button! It's just a test! DON'T FREAK OUT! DONTFREAKOUT! Just calm down, it'll be okay.</p>

<h2>Better now?</h2>
<p>Good. Don't pussy out on me man.</p>

<img src="file:///Users/mhuddle0949/Desktop/Html/Images/THIS%20ONE.jpg">
<p>There's a pwetty fox to calm your fragile nerves.</p>
</div>
</div>

<body>
</html>



My CSS Code


body {
background-color:#dbfef5;
color:#4b5d56;
margin:15px;
Font-family: Verdana, arial;
text-align: center;
}

h1 {
background-color:#87c8b0;
font-size: 36px;
}

.container {
margin: auto;
width: 900px;
background-color:#f1fdf9;
padding: 50px 50px;
}

li {
text-transform: uppercase;
}

ul#nav li{
list-style: none;
overflow: hidden;
margin: -100px auto 10px auto;
float: left;
width: 155px;
height: 144px;
}

#logo {
position: relative;
width: 450px;
margin-top: 0;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
User avatar

maddie0949

  • Posts: 2
  • Joined: Fri Jun 08, 2012 3:19 pm

Re: My text color changed when clicked on in browser

by XainPro » Sat Jun 09, 2012 5:43 am

its default behavior of browser when the link is visited its color changed for telling the user that this link is already visited but you can overwrite this behavior by using css add these rules to overwrite it

Code: Select all
a:link {color:#FF0000;}      /* unvisited link */
a:visited {color:#00FF00;}  /* visited link */
a:hover {color:#FF00FF;}  /* mouse over link */
a:active {color:#0000FF;}  /* selected link */


and change colors according to your need.
User avatar

XainPro

  • Posts: 3669
  • Joined: Fri Feb 17, 2012 8:10 pm


+ Post a reply

Page 1 of 1