IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Mise en page CSS Discussion :

CSS en absolute bancale


Sujet :

CSS

  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2009
    Messages : 19
    Par défaut CSS en absolute bancale
    Bonjour à tous,

    Voila je suis en train de faire... enfin essayer... de faire un site pour un ami, et n'y connaissant pas grand chose, je me retrouve en face de plusieurs problèmes. En fait, deux majeurs pour le moment, si je ne compte pas l'incompatibilité avec les vieux navigateurs.
    Le premier problème est ma barre social qui ne reste pas au bon endroit selon la taille de la fenêtre. Plus la résolution est grande, plus elle part vers la gauche.
    Le second problème est la barre de navigation en dessous qui décroche dès que j'active le module de recherche. Elle en fait même disparaitre l'image de tête.
    Le but au départ était de fixer le tout en position absolute sur un élément pagebody, mais je crois que l'idée est aussi bancale que mon code. :s

    HTML :

    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    <!DOCTYPE html>
     
     
     
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
     
    <head>
     
    <html class="no-js" lang="en_US">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" >
    <!--   CSS -->
    <link rel="stylesheet" type="text/css" media="screen" href="../global/css/w4_fr.css"/>
     
    <link rel="shortcut icon" href="../global/img/gfx/favicon.ico"/>
     
     
    <title>
     
    </title>
     
    </head>
     
    <body bgcolor=#eaeaea>
     
    <!--                                                   -->
    <!--                cadre de fond                    ---->
    <!--   à modifier selon la longueur de la page       ---->
    <!-- ---------------------------------------------------->
     
    <div id="pageBody">
     
     
     
     
    <!--                                                   -->
    <!--                 Barre de Social du haut         ---->
    <!-- ---------------------------------------------------->
    <div class="socialm">
    <CENTER><TABLE>
    <TR>
    <TD><div class="minormenu">
    <a href="company/company.html" class=" "><span>Entreprise</span></a>
    <a href="career/career.html" class=" "><span>Recrutement</span></a>
    <a href="contact/contact.html" class=" "><span>Contacts</span></a>
    <a href="../en/index.html" class=" "><span>English</span></a>
    <!-- Socials -->
    <a href="http://twitter.com/BROADCASTBOX" class=" "><img src="../global/img/gfx/t.png" /></a> <!-- <span>t</span></a> -->
    <a href="http://www.facebook.com/pages/Broadcast-Box/111818052170166" class=" "><img src="../global/img/gfx/f.png" /><!-- <span>f</span></a> -->
    <a href="http://www.linkedin.com/company/" class=" "><img src="../global/img/gfx/in.png" /> </a><span></span></a>
     
     
    </div></TD>
    </TR>
    </TABLE></CENTER> </div> 
     
    <!--         -----------------------   TEST    -------------------------------------------->
     
     
     
     
    <!-- ------------------test---------------------------------->
     
    <!--                                                   -->
    <!--                 Barre de naviguation            ---->
    <!-- ---------------------------------------------------->
     
     
    <div class="navbar">
    <a href=" " class="active home " style="width:115px"><span>home</span></a>
    <a href="products/products.html" class=" " style="width:115px"><span>Produits</span></a>
    <a href="solutions/solutions.html" class=" " style="width:115px"><span>Solutions</span></a>
    <a href="company/company.html" class=" " style="width:115px"><span>Entreprise</span></a>
    <a href="distributors/distributors.html" class=" " style="width:115px"><span>Distributeurs</span></a>
    <a href="investors/investor.html" class=" " style="width:115px"><span>Investisseurs</span></a>
    <a href="news/news.html" class=" " style="width:115px"><span>News</span></a>
     
    <!--
    <div class="searchfield">
    <form method="get" action="../search/">
    <input type="hidden" name="rows" value="20">
    <input type="text" name="queryString" autocomplete="off" placeholder="">
    <button type="submit"><span>search</span></button> 
    </form>  -->
    </div>
     
     
     
     
    <!--                                                   -->
    <!--                 Image de fond                   ---->
    <!-- ---------------------------------------------------->
     
     
    <div id="headimg">
     
     
     
    <!--                                                   -->
    <!--                 barre flotante                  ---->
    <!-- ------------------------------------------------- -->
     
     
     
    <div class="middlebar">
    <ul class="bannerContent">
    <li class="video"><a href="video/" title="Visionner BBOX video">
    <div class="videobox"></div><img style="margin-right:10px; padding-bottom: 0px;" src="../global/img/gfx/foldvideo2.png" alt="Play button" /></a> 
    </li></li>
    <li class="products" title="Consulter les Produits BBOX"><a href="products/products.html"><img style="margin-right:10px; padding-bottom: 0px;" src="../global/img/gfx/Browsebox2.png" alt="Browse button" /></a>
    </li><li class="readbbox"><a href="news/index.html" title="Lire les BBOX news"><img style="margin-right:10px; padding-bottom: 0px;" src="../global/img/gfx/read_news2.png" alt="News button" /></a></li>
    </ul>
    </div>
     
     
     
    <!-- ------------------------------------------------------------------------------------------- -->
    <!-- ---------------------------- ///   FIN DU CONTENEUR DE TETE    \\\ ------------------------ -->
    <!-- ------------------------------------------------------------------------------------------- -->
     
     
    </div>
     
    </body>
    </html>


    CSS:

    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    /*             cadre de fond                   */
    /*  à modifier selon la longueur de la page    */  
     
     
    #pageBody {
      background:#e8e8e9;
      /*background:#d8d8b8;*/  
      width: 960px; 
      height:1250px; 
      position:absolute; 
      border:0;
       left: 50%; 
       margin-left: -480px; 
      /*margin-top:-10px;*/
      z-index:-1;
    } 
     
    /*    ---------------------------- barre social  ------------------------ */
     
    .socialm {
      /*background:#d8d8c4;*/
      z-index:1;
      width: 445px;
      height: 25px;
      border:1;
      position: absolute;
      top: 0px;
      left:562px;  
    }
     
     
    div.minormenu span {
      margin-left: 5px;
      margin-right: 5px;
    }
     
     
    .minormenu a, div.languages a  {
      z-index:1;
      text-align: left;
      font-family: Calibri;
      font-weight : bold;
      text-decoration: none;
      color: #6d6d6f;
      padding: 5px;
      float: left;
      top: 0px;
      font-size: 13px;
      -webkit-transition: color .1s ease-in;
      -moz-transition: color .1s ease-in;
      -o-transition: color .1s ease-in;
      transition: color .1s ease-in;
    }
     
    div.minormenu.light a, div.languages.light a{
      color: white;
      opacity: 0.9;
      text-shadow: 0 -1px 0 black;
    }
     
    .minormenu.light a:hover, .languages.light a:hover {
      opacity:1;
    }
     
    .minormenu a:hover, .languages a:hover {
      color: #000000;
    }
     
     
    /* ---------------------- Nav Barre -----------------------------------------*/
     
    div.navbar {
     
      position: relative;
      top: 25px;
      left: 50%px;
      width: 960px;
      display: block;
      float: left;
      clear: both;
      border-radius: 0px;
      background: #353d46; /* Old browsers */
      /* IE9 SVG, needs conditional override of 'filter' to 'none' */
      background: #353d46 url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzVhNjE2ZSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxYjI0MmEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
      background: -moz-linear-gradient(top, #5a616e 0%, #1b242a 100%); /* FF3.6+ */
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5a616e), color-stop(100%, #1b242a)); /* Chrome,Safari4+ */
      background: -webkit-linear-gradient(top, #5a616e 0%, #1b242a 100%); /* Chrome10+,Safari5.1+ */
      background: -o-linear-gradient(top, #5a616e 0%, #1b242a 100%); /* Opera 11.10+ */
      background: -ms-linear-gradient(top, #5a616e 0%, #1b242a 100%); /* IE10+ */
      background: linear-gradient(top, #5a616e 0%, #1b242a 100%); /* W3C */
      filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#5a616e', endColorstr = '#1b242a', GradientType = 0); /* IE6-8 */
      box-shadow: 0px 0px 0px rgba(255, 255, 255, .35), 0px 0px 0px rgba(0, 0, 0, .35);
    }
     
    div.navbar a {
       list-style-type: none;
            white-space: nowrap;
      font-family: Calibri;
      /*font-weight : bold;*/
      color: #bcc0c3;
      text-decoration: none;
      color: rgb(188, 192, 195);
      font-size: 18px;
      text-shadow: 0px -1px 0px rgb(0, 0, 0);
      float: left;
     
      display: block;
      text-align: center;
      padding: 7px 0px 8px 0px;
      margin: 8px 0px;
      border-right: 2px solid rgba(27, 36, 42, .5);
      box-shadow: 1px 0px 0px rgba(255, 255, 255, .15);
      -webkit-transition: width .2s ease;
      -moz-transition: width .2s ease;
      -o-transition: width .2 ease;
      -ms-transition: width .2 ease;
      transition: width .2 ease;
    }
     
    div.navbar a:hover {
      text-decoration: none;
      text-shadow: 0px 0px 15px #FFFFFF, 0px -1px 0px rgb(0, 0, 0);
    }
     
    div.navbar a.active {
      color: rgb(242, 152, 8);
      text-shadow: 0px -1px 0px rgb(0, 0, 0);
    }
     
    div.navbar a.home, div.navbar a[href='http://sqlsj.free.fr/cn'] {
      background: url("../img/gfx/bboxlogo3.png") no-repeat center center;
      height: 18px;
      /*padding: 0px 0px 0px 0px;*/
      position: relative;
      top: 3px;
      bottom: 0px;
      left: 0px;
    }
     
    div.navbar a.home span {
      display: none;
    }
     
    /** searchfield *//* ici quand j'active tout se colle sur la gauche de la fenetre */
    /*
     
    .searchfield {
      float: right;
      margin: 15px 10px 0 0;
      overflow: hidden;
      height: 22px;
      background: rgb(90, 97, 110);
      border-radius: 14px;
      box-shadow: 0 0 4px rgba(0, 0, 0, .25) inset, 0 1px 0 rgba(255, 255, 255, .25), 0 -1px 0 rgba(0, 0, 0, .35);
      -webkit-transition: background-color .3s ease;
      -moz-transition: background-color .3s ease;
      -o-transition: background-color .3 ease;
      -ms-transition: background-color .3s ease;
      transition: background-color .3s ease;
    }
     
    .seachfield span, .seachfield input[type=text] {
     
    }
     
    .searchfield input[type=text] {
      background: transparent url("../img/gfx/m_glass.png") no-repeat 5px 4px;
      border: 0;
      font-size: 12px;
      height: 15px;
      padding-top: 5px;
      padding-bottom: 5px;
      color: rgb(131, 136, 146);
      text-shadow: 0 -1px 0 rgba(0, 0, 0, .35);
      padding-left: 25px;
      float: left;
      width: 70px;
      -webkit-transition: width .2s ease;
      -moz-transition: width .2s ease;
      -o-transition: width .2 ease;
      -ms-transition: width .2s ease;
      transition: width .2s ease;
    }
     
    .searchfield input[type=text]:focus {
      color: #FFF;
      outline: none;
    }
     
    .searchfield button, .searchfield button span {
      display: none;
    }
     
    .searchfield button {
      background: transparent;
      height: 28px;
      width: 28px;
      overflow: hidden;
      border: 0;
      padding: 0;
      margin: 0;
      display: block;
      float: left;
    }
     
    */
     
     
     
     
     
    /*                ------------------------         test         ----------------------------------  */
     
     
     
     
     
     
    /*---------------------------------------     image de fond          ----------------------------------*/
     
    #headimg {
      background:url(../img/head/1.jpg) no-repeat;
      height: 480px;
      width: 960px;
      /*min-width: 960px;*/
      position: relative;
      top: 75px;
      left: 50%px;
      z-index: 1
    }
     
    /*----------------------------------------  Barre flotante  --------------------------------------------*/
    /* dimentionner la baniere video*/
    div.middlebar {
      border-bottom: 1px solid #BFBFC1;
      box-shadow: 0px 1px 0px #FFFFFF;
      height: 40px;
      position: absolute;
      width: 960px;
      left: 0;
      /*hauteur de la barre video*/
      top: 300px;
      background: #999999; /* Old browsers */
      /* IE9 SVG */
      background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhZWIwYjMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
      background: -o-linear-gradient(top, #ffffff 0%, #dfdfe1 100%); /* Opera 11.10+ */
      background: -ms-linear-gradient(top, #ffffff 0%, #dfdfe1 100%); /* IE10+ */
      background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#dfdfe1)); /* Chrome10+,Safari5.1+ */
      background: -moz-linear-gradient(top, #ffffff, #dfdfe1); /* FF3.6+ */
      background: linear-gradient(top, #ffffff 0%, #dfdfe1 100%); /* W3C */
      filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#dfdfe1', GradientType = 0); /* IE6-8 */
    }
     
     
    ul.bannerContent {
      margin: 0 auto;
      width: 960px;
    }
     
     
    /* place les bouton dans la barre video */
    /* center left body, à trouver pour absolute position */
     
    ul.bannerContent li {
     /* margin-right: 10px;*/
      display: inline-block;
      vertical-align:center;
      position:relative;
      left:150px;
      top:10px;
    }
     
     
     
    /*--------------------------------------------------------------------------------------------*/
    /*---------------------------   ///   FIN DU CONTENEUR DE TETE    \\\ ------------------------*/
    /*--------------------------------------------------------------------------------------------*/
    /*--------------------------------------------------------------------------------------------*/

    Si quelqu'un veut bien tester en activant le module de recherche et m'expliquer d'où cela peut venir, merci d'avance.

  2. #2
    Membre Expert
    Avatar de rodolphebrd
    Homme Profil pro
    Indépendant
    Inscrit en
    Novembre 2012
    Messages
    2 336
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Indépendant
    Secteur : Conseil

    Informations forums :
    Inscription : Novembre 2012
    Messages : 2 336
    Par défaut
    Bonjour,

    Citation Envoyé par uniuc
    Le but au départ étais de fixer le tout en position absolute sur un élément pagebody
    C'est évidemment la plus mauvaise solution pour le positionnement.
    N'hésitez pas à regarder les ressources du site: http://css.developpez.com/cours/

    Vous avez beaucoup d'erreurs de syntaxe, notamment des balises non fermées.

    Tous vos éléments placés en absolute se calent par rapport à la balise HTML c'est à dire par rapport au bord supérieur gauche de votre "écran".

    En l'état, même si le code n'est pas du tout performant, ça n'est pas visible même quand on redimensionne la fenêtre (rien ne bouge).

    Concernant votre second problème, je ne vois pas de qui vous parlez?

    Voici votre code épuré des erreurs flagrantes de syntaxe uniquement:
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    <!doctype html>
    <html>
    <!doctype html>
    <html>
    <meta charset="UTF-8">
    <head>
    <meta httdiv-equiv="Content-Type" content="text/html; charset=utf-8">
    <title></title>
    <style>
    #pageBody {
    background:#e8e8e9;
    width: 960px; 
    height:1250px; 
    position:absolute; 
    border:0;
    left: 50%; 
    margin-left: -480px; 
    z-index:-1;
    } 
    .socialm {
    z-index:1;
    width: 445px;
    height: 25px;
    border:1;
    position: absolute;
    top: 0px;
    left:562px; 
    }
    div.minormenu span {
    margin-left: 5px;
    margin-right: 5px;
    }
    .minormenu a, div.languages a {
    z-index:1;
    text-align: left;
    font-family: Calibri;
    font-weight : bold;
    text-decoration: none;
    color: #6d6d6f;
    padding: 5px;
    float: left;
    top: 0px;
    font-size: 13px;
    -webkit-transition: color .1s ease-in;
    -moz-transition: color .1s ease-in;
    -o-transition: color .1s ease-in;
    transition: color .1s ease-in;
    }
    div.minormenu.light a, div.languages.light a{
    color: white;
    opacity: 0.9;
    text-shadow: 0 -1px 0 black;
    }
    .minormenu.light a:hover, .languages.light a:hover {
    opacity:1;
    }
    .minormenu a:hover, .languages a:hover {
    color: #000000;
    }
    div.navbar {
    position: relative;
    top: 25px;
    left: 50%px;
    width: 960px;
    display: block;
    float: left;
    clear: both;
    border-radius: 0px;
    background: #353d46; /* Old browsers */
    /* IE9 SVG, needs conditional override of 'filter' to 'none' */
    background: #353d46 url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzVhNjE2ZSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxYjI0MmEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
    background: -moz-linear-gradient(top, #5a616e 0%, #1b242a 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5a616e), color-stop(100%, #1b242a)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #5a616e 0%, #1b242a 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #5a616e 0%, #1b242a 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #5a616e 0%, #1b242a 100%); /* IE10+ */
    background: linear-gradient(top, #5a616e 0%, #1b242a 100%); /* W3C */
    filter: progidXImageTransform.Microsoft.gradient(startColorstr = '#5a616e', endColorstr = '#1b242a', GradientType = 0); /* IE6-8 */
    box-shadow: 0px 0px 0px rgba(255, 255, 255, .35), 0px 0px 0px rgba(0, 0, 0, .35);
    }
     
    div.navbar a {
    list-style-type: none;
    white-space: nowrap;
    font-family: Calibri;
    color: #bcc0c3;
    text-decoration: none;
    color: rgb(188, 192, 195);
    font-size: 18px;
    text-shadow: 0px -1px 0px rgb(0, 0, 0);
    float: left;
     
    display: block;
    text-align: center;
    padding: 7px 0px 8px 0px;
    margin: 8px 0px;
    border-right: 2px solid rgba(27, 36, 42, .5);
    box-shadow: 1px 0px 0px rgba(255, 255, 255, .15);
    -webkit-transition: width .2s ease;
    -moz-transition: width .2s ease;
    -o-transition: width .2 ease;
    -ms-transition: width .2 ease;
    transition: width .2 ease;
    }
    div.navbar a:hover {
    text-decoration: none;
    text-shadow: 0px 0px 15px #FFFFFF, 0px -1px 0px rgb(0, 0, 0);
    }
    div.navbar a.active {
    color: rgb(242, 152, 8);
    text-shadow: 0px -1px 0px rgb(0, 0, 0);
    }
    div.navbar a.home, div.navbar a[href='http://sqlsj.free.fr/cn'] {
    background: url("../img/gfx/bboxlogo3.png") no-repeat center center;
    height: 18px;
    position: relative;
    top: 3px;
    bottom: 0px;
    left: 0px;
    }
    div.navbar a.home span {
    display: none;
    }
    #headimg {
    background:url(../img/head/1.jpg) no-repeat;
    height: 480px;
    width: 960px;
    /*min-width: 960px;*/
    position: relative;
    top: 75px;
    left: 50%px;
    z-index: 1
    }
    div.middlebar {
    border-bottom: 1px solid #BFBFC1;
    box-shadow: 0px 1px 0px #FFFFFF;
    height: 40px;
    position: absolute;
    width: 960px;
    left: 0;
    top: 300px;
    background: #999999; /* Old browsers */
    background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhZWIwYjMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
    background: -o-linear-gradient(top, #ffffff 0%, #dfdfe1 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #ffffff 0%, #dfdfe1 100%); /* IE10+ */
    background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#dfdfe1)); /* Chrome10+,Safari5.1+ */
    background: -moz-linear-gradient(top, #ffffff, #dfdfe1); /* FF3.6+ */
    background: linear-gradient(top, #ffffff 0%, #dfdfe1 100%); /* W3C */
    filter: progidXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#dfdfe1', GradientType = 0); /* IE6-8 */
    }
    ul.bannerContent {
    margin: 0 auto;
    width: 960px;
    }
    ul.bannerContent li {
    /* margin-right: 10px;*/
    display: inline-block;
    vertical-align:center;
    position:relative;
    left:150px;
    top:10px;
    }
    </style>
    </head>
    <body bgcolor=#eaeaea>
    <div id="pageBody">
    <div class="socialm">
      <CENTER>
        <TABLE>
          <TR>
            <TD>
            <div class="minormenu"> 
            <a href="company/company.html" class=" "><span>Entreprise</span></a> 
            <a href="career/career.html" class=" "><span>Recrutement</span></a> 
            <a href="contact/contact.html" class=" "><span>Contacts</span></a> 
            <a href="../en/index.html" class=" "><span>English</span></a> 
                <!-- Socials --> 
            <a href="http://twitter.com/BROADCASTBOX" class=" "><img src="../global/img/gfx/t.png" /></a> 
            <a href="http://www.facebook.com/pages/Broadcast-Box/111818052170166" class=" "><img src="../global/img/gfx/f.png" /></a>
            <a href="http://www.linkedin.com/company/" class=" "><img src="../global/img/gfx/in.png" /> </a>
                </div>
                </TD>
          </TR>
        </TABLE>
      </CENTER>
    </div>
    <div class="navbar"> 
    <a href=" " class="active home " style="width:115px"><span>home</span></a> 
    <a href="products/products.html" class=" " style="width:115px"><span>Produits</span></a> 
    <a href="solutions/solutions.html" class=" " style="width:115px"><span>Solutions</span></a> 
    <a href="company/company.html" class=" " style="width:115px"><span>Entreprise</span></a> 
    <a href="distributors/distributors.html" class=" " style="width:115px"><span>Distributeurs</span></a> 
    <a href="investors/investor.html" class=" " style="width:115px"><span>Investisseurs</span></a> 
    <a href="news/news.html" class=" " style="width:115px"><span>News</span></a> 
    </div>
    <div id="headimg"> 
      <div class="middlebar">
        <ul class="bannerContent">
          <li class="video">
          <a href="video/" title="Visionner BBOX video"></a>
            <div class="videobox"></div>
            <img style="margin-right:10px; padding-bottom: 0px;" src="../global/img/gfx/foldvideo2.png" alt="Play button" /></a> 
            </li>
          <li class="products" title="Consulter les Produits BBOX">
          <a href="products/products.html"><img style="margin-right:10px; padding-bottom: 0px;" src="../global/img/gfx/Browsebox2.png" alt="Browse button" /></a> 
          	</li>
          <li class="readbbox">
          <a href="news/index.html" title="Lire les BBOX news"><img style="margin-right:10px; padding-bottom: 0px;" src="../global/img/gfx/read_news2.png" alt="News button" /></a>
         	</li>
        </ul>
      </div>
      </div>
      </div>
    </body>
      </html>

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2009
    Messages : 19
    Par défaut
    le second problème, viens des que j'active searchfield en ligne 78 sur mon code html et 145 sur mon css , mais en ce qui concerne ceci je pense passer par l'outil de recherche google par la suite la c'est un morceaux de code que j'ai pris pour la mise en page :s

    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    <div class="searchfield">
    <form method="get" action="../search/">
    <input type="hidden" name="rows" value="20">
    <input type="text" name="queryString" autocomplete="off" placeholder="">
    <button type="submit"><span>search</span></button> 
    </form>  
    </div>

    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    .searchfield {
      float: right;
      margin: 15px 10px 0 0;
      overflow: hidden;
      height: 22px;
      background: rgb(90, 97, 110);
      border-radius: 14px;
      box-shadow: 0 0 4px rgba(0, 0, 0, .25) inset, 0 1px 0 rgba(255, 255, 255, .25), 0 -1px 0 rgba(0, 0, 0, .35);
      -webkit-transition: background-color .3s ease;
      -moz-transition: background-color .3s ease;
      -o-transition: background-color .3 ease;
      -ms-transition: background-color .3s ease;
      transition: background-color .3s ease;
    }
     
    .seachfield span, .seachfield input[type=text] {
     
    }
     
    .searchfield input[type=text] {
      background: transparent url("../img/gfx/m_glass.png") no-repeat 5px 4px;
      border: 0;
      font-size: 12px;
      height: 15px;
      padding-top: 5px;
      padding-bottom: 5px;
      color: rgb(131, 136, 146);
      text-shadow: 0 -1px 0 rgba(0, 0, 0, .35);
      padding-left: 25px;
      float: left;
      width: 70px;
      -webkit-transition: width .2s ease;
      -moz-transition: width .2s ease;
      -o-transition: width .2 ease;
      -ms-transition: width .2s ease;
      transition: width .2s ease;
    }
     
    .searchfield input[type=text]:focus {
      color: #FFF;
      outline: none;
    }
     
    .searchfield button, .searchfield button span {
      display: none;
    }
     
    .searchfield button {
      background: transparent;
      height: 28px;
      width: 28px;
      overflow: hidden;
      border: 0;
      padding: 0;
      margin: 0;
      display: block;
      float: left;
    }

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [CSS]position:absolute; et image centrée
    Par tibotibotibo dans le forum Mise en page CSS
    Réponses: 3
    Dernier message: 27/09/2006, 10h20
  2. [CSS] Position absolute et relative
    Par GyZmoO dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 04/07/2006, 18h04
  3. [CSS] relative, absolute, effet scrolling extra
    Par speedev dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 22/06/2006, 12h10
  4. [CSS] Placement "bancal" de blocs div
    Par unicyclon dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 22/09/2005, 10h25
  5. [HTML/CSS] position absolute et centrage
    Par LE NEINDRE dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 23/08/2005, 11h11

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo