Petit problême marge de DIV en CSS...

Résolu/Fermé
Utilisateur anonyme - 1 juil. 2010 à 18:28
 Utilisateur anonyme - 2 juil. 2010 à 18:38
Bonjour,

Voilà le début de mon site :

http://www.escienca.com/

Je voudrais que le module "Recherche" (à droite), sois plus bas, mais je ne trouve pas comment augmenter la marge haute, voici le code CSS complet, avec en gras la partie concernant spécifiquement le module "Rechercher" donc:

/* PAGE STYLE */
body {
margin-left:57px;

padding:0px;
background:#000000;
color:#ffffff;
min-width:700px;
font-family:'Verdana', sans-serif;
font-size:9pt;
font-weight:500;
line-height:12pt;
text-decoration: none;
margin-top:0px;
}
table {
font-family:'Verdana', sans-serif;
font-size:9pt;
}
form {
margin:0px;
}
a {
color: #ffffff;
text-decoration: underline;
}
a img{ border:none;}
hr {
border:0;
width:100%;
color:#ffffff;
background-color:#000000;
height:1px;
width:100%;
margin:6px 0px 12px 0px;
}
#wrap {
width:748px;
}
#rule {
height:1px;
background-color:#000000;
width:100%;
margin:6px 0px 12px 0px;
}
h2 {
font-size:16px;
font-weight:bold;
margin:0px;
padding:0px;
}
h3 {
font-size:14px;
font-weight:bold;
margin:0px;
padding:0px;
}

/* MAIN PAGE AREA */

#mainwrap {
float:left;
margin-top:0px;
}
#main {
width:535px;
margin-bottom:0px;
overflow:hidden;
background:#000000;
}
div#header {
background:#000000;
padding:0px 0px 0px;
margin:0;

}
a#mainheadertitle {
margin-top:0px;
padding:0px;
font-family:'Verdana', sans-serif;
font-size:32pt;
font-weight:normal;

color:#FFFFFF;
margin-top:0px;
text-align:left;

text-decoration:none;
}
a#mainheadertitle:hover {
text-decoration:underline;
margin-top:0px;
}
td#mainheaderlogo {
padding:5px;
margin-top:0px;
}
img#mainlogo {
padding-right:5px;
margin-top:0px;
}
div#mainsubheader {
background:#000000;
padding:10px 10px;
vertical-align:middle;
margin-top:0px;
}
div#contentsubheader {
width:482px;
overflow:hidden;
}
div#subheaderlinks {
float:right;
text-align:right;
}
div#subheadertitle {
font-size:12pt;
font-weight:bold;
}
div#contenterror {
background:#000000;
padding:14px 24px;
}
span.currentpage {
font-weight:bold;
}

span.error {
font-weight:bold;
}

/* SIDEBAR */
#sidebar {
float:right;
width:200px;
overflow:hidden;
}
#sidebar ul {
margin-bottom:0;
}
#sidebar h3, #sidebar p {
padding:0 10px;
}

/* GENERAL SIDEBAR WIDGET STYLES */
ul#widget,ul.widget li.widget {
margin:0;
padding:0;
list-style:none;
}
li.widget {
float:left;
width:200px;
margin-bottom:19px;
}
ul#widget div {
background:#000000;
}
ul#widget h3 {
font-family:'Verdana', sans-serif;
font-size: 10pt;
font-weight: bold;
color:#FFFFFF;
margin:0px;
padding:6px 15px 4px;
text-align:left;
background:#000000;
}
ul#widget p {
font-family:'Verdana', sans-serif;
font-size: 9pt;
font-weight: normal;
color:#ffffff;
margin:0px;
padding: 10px 15px 20px;
}

/* SEARCHBROWSE WIDGET */
div#searchbrowse {
padding-top:10px;
}
div#searchbrowse div.indent {
padding: 0px 0px 0px 0px;
}
select.searchwidget {
width:190px;
margin-bottom:6px;
}
input#searchwidgetkeywords {
width:135px;
}
span#SearchAtAmazon {
font-size: 8pt;
}
div#browsetitle {
font-weight:bold;
padding-bottom:20px;
margin-top:10px;
}
span.selectedcategory {
font-weight:bold;
}


/* LISTMANIA WIDGET */
div.listwidget {
padding-bottom:16px;
}
ul.listmania {
margin:0px;
padding:0px;
list-style:none;
}
ul.listmania li {
margin:0px;
padding:5px;
padding-left:10px;
list-style:none;
text-align:center;
}
ul.listmania li.clsOdd,li.listimages {
background-color:#F9F9D5;
}
ul.listmania li.clsEven {
background-color:#EFEFCC;
}

img.listimage {
display:block;
margin-left:auto;
margin-right:auto;
}

/* PRODUCTS WIDGETS */
div.productwidget {
padding:0px;
padding-bottom:16px;
}
div.productwidget .price {
font-weight:bold;
}
table.sidebarproducts {
font-family:'Verdana', sans-serif;
font-size:9pt;
width:200px;
}
table.sidebarproducts td {
padding:5px;
}
table.sidebarproducts td.image {
vertical-align:top;
width:75px;
}
table.sidebarproducts td.text {
vertical-align:middle;
width:115px;
}
table.sidebarproducts span.listtitle {
font-weight:bold;
}
div.privacylink {
padding: 2px 5px;
font-size:7pt;
text-align:center;
}

/* FOOTER */
div#footer {
width:530px;
margin-bottom:42px;
color:#A43907;
border-top:1px solid #A43907;
}
div#footer p {
padding:5px;
margin:0;
}
div#leftfoot {
float:left;
width:430px;
}
div#rightfoot {
float:right;
width:100px;
text-align:right;
}

/* WISHLIST WIDGET */
div#wishlist_page_link
{
padding:7px 5px 5px;
}

Cordialement

3 réponses

le_joker_fou Messages postés 764 Date d'inscription mercredi 5 août 2009 Statut Membre Dernière intervention 7 août 2014 239
1 juil. 2010 à 19:01
Bonjour,

utilisez la methode float, pour vous faciliter la vie.

div #searchbrowse {
float:right;
}

Votre div flottera à droite, mais attention car il survolera aussi tous les autres div.
0
Utilisateur anonyme
1 juil. 2010 à 19:24
Ok merci j'essaierais je vous tiendrait au courant, mais demain, là la journée est fini, (ouf enfin ^i^) , depuis ce matin 8 heures je suis devant l'écran.

Cordialement
0
Utilisateur anonyme
2 juil. 2010 à 18:38
Bonjour j'ai finalement trouvé la solution pour mon site :

http://www.escienca.com/

Je vous met le code source avec en gras ce que j'ai rajouté, c'était dans "sidebar". Je trouve toujours au final ('^i^), et si ça peut servir, ma foi :

/* PAGE STYLE */
body {
margin-left:57px;

padding:0px;
background:#000000;
color:#aaaaaa;
min-width:700px;
font-family:'URW Chancery L';
font-size:9pt;
font-weight:500;
line-height:12pt;
text-decoration: none;
margin-top:0px;
}
table {
font-family:'URW Chancery L';
font-size:9pt;
}
form {
margin:20px;
}
a {
color: #aaaaaa;
text-decoration: underline;
}
a img{ border:none;}
hr {
border:0;
width:100%;
color:#aaaaaa;
background-color:#000000;
height:1px;
width:100%;
margin:6px 0px 12px 0px;
}
#wrap {
width:748px;
}
#rule {
height:1px;
background-color:#000000;
width:100%;
margin:6px 0px 18px 0px;
}
h2 {
font-size:16px;
font-weight:bold;
margin:0px;
padding:0px;
}
h3 {
font-size:14px;
font-weight:bold;
margin:0px;
padding:0px;
}

/* MAIN PAGE AREA */

#mainwrap {
float:left;
margin-top:0px;
}
#main {
width:535px;
margin-bottom:19px;
overflow:hidden;
background:#000000;
}
div#header {
background:#000000;
padding:6px 24px 4px;
margin:0;
vertical-align:middle;

}
a#mainheadertitle {
margin:0px;
padding:0px;
font-family:'URW Chancery L';
font-size:32pt;
font-weight:normal;
line-height:1.5em;
color:#aaaaaa;
margin-top:0px;
text-align:left;
vertical-align:middle;
text-decoration:none;
}
a#mainheadertitle:hover {
text-decoration:underline;
margin-top:0px;
}
td#mainheaderlogo {
padding:0px;
margin-top:0px;
}
img#mainlogo {
padding-right:5px;
margin-top:0px;
}
div#mainsubheader {
background:#000000;
padding:10px 24px;
vertical-align:middle;
margin-top:0px;
}
div#contentsubheader {
width:482px;
overflow:hidden;
}
div#subheaderlinks {
float:right;
text-align:right;
}
div#subheadertitle {
font-size:12pt;
font-weight:bold;
}
div#contenterror {
background:#000000;
padding:14px 24px;
}
span.currentpage {
font-weight:bold;
}

span.error {
font-weight:bold;
}

/* SIDEBAR */
#sidebar {
float:right;
width:200px;
overflow:hidden;
margin-top:143px;
}
#sidebar ul {
margin-bottom:0;
}
#sidebar h3, #sidebar p {
padding:10 10px;
}

/* GENERAL SIDEBAR WIDGET STYLES */
ul#widget,ul.widget li.widget {
margin:0;
padding:0;
list-style:none;
}
li.widget {
float:right;
width:200px;
margin-bottom:19px;
}
ul#widget div {
background:#000000;
}
ul#widget h3 {
font-family:'URW Chancery L';
font-size: 10pt;
font-weight: bold;
color:#aaaaaa;
margin:0px;
padding:6px 15px 4px;
text-align:left;
background:#000000;
}
ul#widget p {
font-family:'URW Chancery L';
font-size: 9pt;
font-weight: normal;
color:#aaaaaa;
margin:0px;
padding: 10px 15px 20px;
}

/* SEARCHBROWSE WIDGET */
div#searchbrowse {

padding:0px;
}
div#searchbrowse div.indent {
padding: 5px 0px 5px 5px;
}
select.searchwidget {
width:190px;
margin-bottom:6px;
}
input#searchwidgetkeywords {
width:135px;
}
span#SearchAtAmazon {
font-size: 8pt;
}
div#browsetitle {
font-weight:bold;
padding-bottom:20px;
margin-top:10px;
}
span.selectedcategory {
font-weight:bold;
}

/* LISTMANIA WIDGET */
div.listwidget {
padding-bottom:16px;
}
ul.listmania {
margin:0px;
padding:0px;
list-style:none;
}
ul.listmania li {
margin:0px;
padding:5px;
padding-left:10px;
list-style:none;
text-align:center;
}
ul.listmania li.clsOdd,li.listimages {
background-color:#F9F9D5;
}
ul.listmania li.clsEven {
background-color:#EFEFCC;
}

img.listimage {
display:block;
margin-left:auto;
margin-right:auto;
}

/* PRODUCTS WIDGETS */
div.productwidget {
padding:0px;
padding-bottom:16px;
}
div.productwidget .price {
font-weight:bold;
}
table.sidebarproducts {
font-family:'URW Chancery L';
font-size:9pt;
width:200px;
}
table.sidebarproducts td {
padding:5px;
}
table.sidebarproducts td.image {
vertical-align:top;
width:75px;
}
table.sidebarproducts td.text {
vertical-align:middle;
width:115px;
}
table.sidebarproducts span.listtitle {
font-weight:bold;
}
div.privacylink {
padding: 2px 5px;
font-size:7pt;
text-align:center;
}

/* FOOTER */
div#footer {
width:530px;
margin-bottom:42px;
color:#A43907;
border-top:1px solid #A43907;
}
div#footer p {
padding:5px;
margin:0;
}
div#leftfoot {
float:left;
width:430px;
}
div#rightfoot {
float:right;
width:100px;
text-align:right;
}

/* WISHLIST WIDGET */
div#wishlist_page_link
{
padding:7px 5px 5px;
}

Merci encore, je continue à avancer.

Cordialement.
0