PDA

View Full Version : Align top center links


masterofollies
07-27-2005, 03:25 AM
So at the top of my page I want a bunch of links left to right. I've tried using a frame, tried using align=center on each link, tried just putting them next to each other and everything. It either goes down a link for the next link, goes under the content or screws everything up and links everything. Here is the coding, can anyone help me with this? to see the uploaded copy on my server go to www.creativeskateboardteam.com/index2.php



<html><head>
<title>Creative Skateboards</title>
<meta http-equiv="Content-Type" content="text/html;

charset=iso-8859-1">
<style type='text/css'>
body {
background: #000000;
color: #FFF;
}
h1,h3, {
color: #00B2EE;
}
{
h2,h4 {
color: #FF0033;
}
a {
color: #FFFF00;
font-family: Tahoma;
}
a:hover {
color: #CC6600;
}
td {
color: #FFF;
}
</style>
</head>
<body>
<h4 align="center"><a

href="http://www.creativeskateboardteam.com">Home</a></h4>

<img src="http://www.creativeskateboardteam.com/cstpic.jpg">
<br>
Graphic copyrighted by Jeff Gaither 2004<br><br>

<img src="http://www.creativeskateboardteam.com/breakline.jpg">
<script language="JavaScript"

src="http://www.biblegateway.com/usage/votd/votd2html.php?version=31

&amp;jscript=1">
</script>
<!-- alternative for no javascript -->
<noscript>
<a

href="http://www.biblegateway.com/usage/votd/votd2html.php?version=3

1&amp;jscript=0">View Verse of the Day</a>
</noscript><br>
<img src="http://www.creativeskateboardteam.com/breakline.jpg">

_Aerospace_Eng_
07-27-2005, 03:34 AM
So you are putting each link inside of an h4 tag of its own? If you are doing that and not floating the h4s then you will never get the links on the same lin. I say if you want to use the h4, place all of the links either side by side or in an unordered or ordered list, floating each li to the left or right. If you just put the links on the same line, you can use text-align:center; in the CSS for the h4's

zro@rtv
07-27-2005, 03:36 AM
little confused....

so you want links on the same line as "home"?
if thats the case.... it drops below because h4 is a block level element.
use
display:inline;
on h4


ALSO:
you don't need align=center and all those br's...
that can all be taken care of w/ css.
and H elements are supposed to come in ORDER.... like:
h1> h2> h3
h2> h3, h3, h3> h4

could you rephrase your question, maybe?

masterofollies
07-27-2005, 03:55 AM
How do you float? Yeah I want them all on the same line at the top of the page, each one needs to be a different link.

_Aerospace_Eng_
07-27-2005, 03:59 AM
Why can't you just put all of the links inside an h4? You can float an element by adding float:left; to the CSS for that element, but I think you are just creating more unecessary work for yourself. Just put all of the links inside a single h4 rather than an h4 for each links.

masterofollies
07-27-2005, 04:00 AM
the display:inline; works but the links are underlined, is this a flaw to it?

_Aerospace_Eng_
07-27-2005, 04:17 AM
No, no flaw, links most of the time are underlined by default. To get rid of the underline, change this in your CSS
a {
color: #FFFF00;
font-family: Tahoma;
}
a:hover {
color: #CC6600;
}
to this
a, a:link, a:visited, a:active {
color: #FFFF00;
font-family: Tahoma;
text-decoration:none;
}
a:hover {
color: #CC6600;
text-decoration:none;
}
The display:inline inside the h4 CSS isn't needed if you are putting all of the links within the H4.

masterofollies
07-27-2005, 04:23 AM
Hey thanks alot for the advice. It worked