Forum Moderators: not2easy

Message Too Old, No Replies

Please help me to center

i have a problem with this css code

         

StyleCoding

10:49 pm on Sep 5, 2010 (gmt 0)

10+ Year Member



I have a pagination code like this;
<html>
<head>
<style>
.pages li{float:left; width:30px; height:20px; list-style:none;}
</style>
</head>
<body>
<div class="pages">
<ul>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>

</div>
</html>


But i want to see this page numbers in centered view. And with using float code, is this possible?

birdbrain

8:13 am on Sep 6, 2010 (gmt 0)



Hi there StyleCoding,

and a warm welcome to these forums. ;)

does this help...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">

<title>1, 2, 3, 4 and 5</title>

<style type="text/css">
#pages {
padding:0;
margin:0;
width:150px;
margin:auto;
}
#pages li{
float:left;
width:30px;
height:20px;
list-style-type:none;
}
</style>

</head>
<body>

<ul id="pages">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>

</body>
</html>

birdbrain

StyleCoding

10:42 am on Sep 6, 2010 (gmt 0)

10+ Year Member



Hi birdbrain,

Thank you for your solution. Its working. Thank you :)

birdbrain

11:22 am on Sep 6, 2010 (gmt 0)



No problem, you're very welcome. ;)