...

View Full Version : CSS Help.



Ranger56
03-19-2005, 08:31 AM
I'm really new to CSS and for some reason
a{font-family: "Arial", "Veranda", sans-serif;
color:white;
font-size:14px;
text-align:center;
}
the "text-align:center;" attribute doesn;t work. I have 3 other things where it does. Any help is appreciated.

_Aerospace_Eng_
03-19-2005, 09:26 AM
we need to see the html, but if you want all of the text to center, put that the text-align:center; in the body tag

Kurashu
03-19-2005, 03:40 PM
Your text-align won't work because you are aplying it into a inline element.

chilipie
03-19-2005, 06:56 PM
^ What he said.

If you want a elements to align center, do this:

a {
display: block;
text-align: center;
}

Please use a more descriptive post title next time :) .

Ranger56
03-19-2005, 07:27 PM
I got help last night, but thanks anyways.

I do, however, have another problem.

On all my other pages, the
a:hover{text-decoration:underline;} works, but not on this page. Here's the HTML.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Spiders Eat Babies Is The Best Band Ever</TITLE>

<style type="text/css">
p{font-family:"Arial", sans-serif;
font-size:15px;
font-weight:100;
text-align:center;
color:white;
margin-bottom:100px;
}

A{text-decoration:none;
color:#FFFFFF;
font-family:"Arial", sans-serif;
}
A:hover{text-decoration: underline;
cursor:crosshair;
color:#FFFFFF;
}
A:active{color:green;
text-decoration:none;
}
A:visited{text-decoration:none;
color:#FFFFFF;
}

body{background:#000000;
}

p.image{text-align:center;}

p.link{font-size:15px;
}

</style>
</HEAD>
<BODY>


<p class="image"><img src="images/music.jpg" alt="Music12!#" /></p>
<p>Pick an album...</p>


Spiders Eat Babies.<br />
<p class="image"><A HREF="seb.html"><IMG alt="spiderseatbabies (8K)" src="images/spiderseatbabies.JPG"
height="28" width="460" /></A></p>


Zombies vs. Ghost Pirates vs. Dinosaurs<br />
<p class="image"><A HREF="nu.html"><img src="images/nu.jpg" alt="Who Will Win?!" /></a></p>

<p class="link"><A HREF="index.html">Home...</A></p>


<p class="link"><A HREF="band.html">Meet the band</A></p>

</BODY>
</HTML>

_Aerospace_Eng_
03-19-2005, 07:39 PM
they go in a certain order
a
a:link
a:visited
a:hover
a:active

you need all of them most of the time some browsers stutter a bit, like IE

a {
text-decoration:none;
color:#FFFFFF;
font-family:arial, sans-serif;
}
a:link {
text-decoration:none;
color:#FFFFFF;
}
a:visited {
text-decoration:none;
color:#FFFFFF;
}
a:hover {
text-decoration: underline;
cursor:crosshair;
color:#FFFFFF;
}
a:active{
color:green;
text-decoration:none;
}
you only need quotes around a font name when the font name is more than one word

Ranger56
03-19-2005, 07:44 PM
Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum