Jump to content
php.lv forumi

Nocentrēt.


forSilence

Recommended Posts

Nu itkā tavu domu sapratu tapēc pameignāju ar nocentrēt izmantojot margin. Man viņš centrā, bet citiem škībi.

 

#content {
width:900px;
position:absolute;
margin: 0px 62px auto;
padding-bottom:70px;
background:url(images/bg.png);
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
top:185px;
}

Link to comment
Share on other sites

vienkāršāk ir šādi:

 

#wrapper{
 width:960px;
 margin:0 auto;
}
#header{
 height:80px;
}
#content{
 margin:5px 0;
 padding:0 0 70px 0;
 background:url(images/bg.png);
 border-radius: 5px;
 -moz-border-radius: 5px;
 -webkit-border-radius: 5px;
}

 

<div id="wrapper">
 <div id="header"></div>
 <div id="menu"></div>
 <div id="content"></div>
 <div id="footer"></div>
</div>

Link to comment
Share on other sites

Piemēram es formēju tā:

<div id="wrap">
  <div id="content"></div>
  <div id="header"></div>
  <div id="footer"></div>
</div>

Jo man patīk, ka lietotājs saņem pirmo saturu, nevis kaut kādus headerus vai navigāciju. Un meklētājam arī tas ir mazliet draudzīgāk.

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...
×
×
  • Create New...