Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    centrare layout con file css

    ciao a tutti
    ho pubblicato un sito solo che il layout sta tutto a sinistra e io vorrei centrarlo tutto...
    il css è questo:

    codice:
    html, body, h1, h2, h3, h4, ul, li {
    	margin: 0;
    	padding: 0;
    }
    h1 img {
    	display: block;
    }
    img {
    	border: 0;
    }
    a {
    	color: #FFFFFF;
    }
    a:hover {
    	color: #FFA405;
    }
    .left {
    	float: left;
    }
    .right {
    	float: right;
    }
    .more {
    	text-align: right;
    }
    .clear {
    	clear: both;
    }
    
    body {
    	background: #3A0404 url(images/page_bg.jpg) repeat-x;
    	font: 11px arial, sans-serif;
    	color: #464544;
    	padding-bottom: 10px;
    }
    
    /** layout **/
    #wrapper {
    	width: 678px;
    	min-height: 750px;
    	_height: 750px;
    	background: url(images/header.jpg) no-repeat;
      position: relative;
    }
    
    h1 {
      padding: 25px 0 0 30px;
      font: 32px "arial black", arial, sans-serif;
      color: #151515;
    }
    
    h1 em {
      color: #ffffff;
      font-weight: bold;
      font-style: normal;
      position: relative;
      top: -4px;
    }
    
    /* nav */
    
    #nav {
      position: absolute;
      top: 0px;
      left: 335px;
      width: 500px;
    }
    #nav li {
      float: left;
      background: url(images/nav_left.gif) no-repeat;
      list-style: none;
      padding-left: 10px;
      padding-right: 20px;
      padding-top: 45px;
      line-height: 1.1;
    }
    #nav span {
      display: block;
      font-size: 28px;
    }
    #nav a {
      color: #FFFFFF;
      font-size: 11px;
      font-weight: bold;
      text-decoration: none;
    }
    
    /** topcontent **/
    
    #topcon {
      background: url(images/topcon.jpg) no-repeat;
      width: 427px;
      position: absolute;
      top: 105px;
      left: 338px;
      color: #fff;
    }
    #topcon-inner {
      margin: 33px 40px 41px 85px;
      height: 120px;
      overflow: auto;
    }
    #topcon h2 {
      font-size: 14px;
    }
    
    /** Body **/
    
    #content {
      width: 710px;
      position: absolute;
      color: #fff;
      top: 299px;
      left: 33px;
    }
    #content a {
      color: #fff;
    }
    #content a:hover {
      color: #fee;
    }
    #body {
      border: 3px solid white;
      background: #901315;
      padding: 18px;
    }
    
    .box {
      float: left;
      width: 195px;
      background: #730F11;
      margin-right: 18px;
    }
    .box-t { background: top url(images/box_t.gif) repeat-x; }
    .box-r { background: right url(images/box_r.gif) repeat-y; }
    .box-b { background: bottom url(images/box_b.gif) repeat-x; }
    .box-l { background: left url(images/box_l.gif) repeat-y; }
    .box-tr { background: top right url(images/box_tr.gif) no-repeat; }
    .box-br { background: bottom right url(images/box_br.gif) no-repeat; }
    .box-bl { background: bottom left url(images/box_bl.gif) no-repeat; }
    .box-tl { background: top left url(images/box_tl.gif) no-repeat; }
    
    .box-tl {
      padding: 13px 18px;
    }
    
    .box p {
      margin: 1em 0;
    }
    
    p.more {
      margin: 0;
    }
    
    #hits {
      width: 240px;
    }
    #hits .box-tl {
      padding-bottom: 22px;
    }
    #hits ul {
      margin: 1em 0;
    }
    #hits li {
      list-style: none;
      margin: 0.9em 0;
    }
    #hits ul a {
      text-decoration: none;
    }
    #hits ul a:hover {
      text-decoration: underline;
    }
    
    #new {
      margin-right: 0;
    }
    #new .box-tl {
      padding-bottom: 18px;
    }
    #new p {
      margin-top: 0;
      margin-bottom: 3.6em;
    }
    
    #body h2 {
      font-size: 12px;
      text-align: right;
      margin-bottom: 1.5em;
    }
    #body h3 {
      font-size: 9px;
      color: #FFEA00;
    }
    #body .more a {
      font-weight: bold;
      text-decoration: none;
    }
    #body .more a:hover {
      text-decoration: underline;
    }
    #body .hr-yellow {
      border-top: 1px solid #FFEA00;
      padding-bottom: 1em;
      margin-top: 1em;
    }
    
    /** footer **/
    #footer {
      text-align: center;
    }
    #footer p, #footer ul {
      margin: 0.8em;
    }
    #footer ul {
      margin-top: 1.2em;
    }
    #footer li {
      display: inline;
      list-style: none;
    }
    cosa devo modificare per centrare il layout? grazie!

  2. #2

  3. #3
    grazie per i link ma proprio non ci sono riuscito a modificarlo... ho messo position absolute in container ma non è cambiato nulla.. chi può dirmi dove e cosa devo modificare?? il css è quello postato su.thanks!

  4. #4
    #wrapper {
    width: 678px;
    margin-left:auto;
    margin-right:auto;
    min-height: 750px;
    _height: 750px;
    background: url(images/header.jpg) no-repeat;
    position: relative;
    }


    Ciao!
    "Le uniche cose che sbagli sono quelle che non provi a fare."
    Atipica

  5. #5
    Originariamente inviato da specialdo87
    grazie per i link ma proprio non ci sono riuscito a modificarlo... ho messo position absolute in container ma non è cambiato nulla.. chi può dirmi dove e cosa devo modificare?? il css è quello postato su.thanks!

    ma grazieeeeee!!! ti posso dare un bacio????? hehe!! tanto sei pure di bologna!!! grazie infinite!!!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.