Jump to content
php.lv forumi

Vairaku objektu kopas iecentrēšana


Saldenieks
 Share

Recommended Posts

Man ir tāda problēma, ka ir nepieciešams iecentrēt vai nu list objectus vai piemēram paragrāfa objektus div tagā, taču nezinu kā, jo centrēšana ar margin nestrādā un īsti nezinu kapēc

 

CSS kods:

.navbar{
background-image:url(../images/style/navbar.jpg);
height:45px;
margin-top:265px;
position:absolute;
width:100%;
font-weight:bold;
box-shadow:0px 10px 30px #888;
}
.navbar ul{
line-height:35px;
margin:10px 0 0 10%;
padding:0;
clear:both;
}
.navbar ul li{
list-style:none;
padding:0;
float:left;
display:block;
width:14.82%;
text-align:center;
}
.navbar ul li:hover, .navbar ul li.now{
background:#fff;
border-radius:5px 5px 0 0;
background-image:url(../images/style/maintop.jpg);
opacity:0.5;
}
.navbar a{
display:block;
}

HTML kods:

<div class="navbar"><div class="toCenter">
 <ul>
 <li><a href="index.php">Par mums</a></li>
 <li class="now"><a href="products.php">Piedāvājums</a></li>
 <li><a href="worktime.php">Darbalaiks</a></li>
 <li><a href="prices.php">Cenrādis</a></li>
 <li><a href="contacts.php">Kontakti</a></li>
 <li><a href="howtofind.php">Kā mūs atrast</a></li>
 </ul>
</div></div>

Edited by Saldenieks
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...