Click to See Complete Forum and Search --> : float center?


chesswill
11-15-2006, 03:20 AM
I want to position the w3 logo, sitemap and contact details link along the bottom of my pages. I want to position them the same no matter what size screen being used.

Will float left, center and right work?

http://www.gordonengraving.co.uk/Perspex.html

mooi
11-15-2006, 06:13 AM
Hello chesswill,

It will work but you're going to have to use the float attribute in a block tag like a div. You can make the <a> have "display:block" but I would suggest using a div tag because that is what they are for.

:)

KDLA
11-15-2006, 08:38 AM
You could style them as an inline list, with padding based on percentages to space them.
KDLA

ray326
11-15-2006, 02:18 PM
There is no float:center.

_Aerospace_Eng_
11-15-2006, 02:36 PM
Something like this should work
<ul id="bottom">
<li><a href="sitemap.html">sitemap</a></li>
<li><a href="http://validator.w3.org/check?uri=referer"><img border="0"
src="http://www.w3.org/Icons/valid-html401"
alt="Valid HTML 4.01!" height="31" width="88"></a></li>
<li><a href="index.html#contact">contact</a></li>
</ul>
#bottom {
margin:0;
padding:0;
list-style:none;
text-align:center;
height:31px;
}
#bottom li {
width:33.3%;
float:left;
height:31px;
line-height:31px;
}

ray326
11-15-2006, 02:43 PM
Or a slight variant for the text alignment.

.left { text-align:left; }
.center { text-align:center }
.right { text-align:right }

<ul id="bottom">
<li class="left"><a href="sitemap.html">sitemap</a></li>
<li class="center"><a href="http://validator.w3.org/check?uri=referer"><img border="0"
src="http://www.w3.org/Icons/valid-html401"
alt="Valid HTML 4.01!" height="31" width="88"></a></li>
<li class="right"><a href="index.html#contact">contact</a></li>
</ul>