Jokeriders Posted June 22, 2016 Share Posted June 22, 2016 Bonjour, je n'arrive pas a modifier mon fichier correctement , je ne suis pas assez calé en css ! d'origine le module aligne 4 cases de recherche sur 1 ligne ( 3 recherche + "chercher" ) je voudrais ajouter une 4eme cases de recherche, 4 recherche + chercher soit 5 cases mais a ce moment la , il mets la 5eme sur la ligne dessous ... et je voudrais les avoir sur une seul ligne. voici le fichier css : j'ai déjà adapté la taille des cases pour tout rentre sur la ligne... .horizontal-select { display: block; float: left; width: 20%; padding-right: 15px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; } .horizontal-select .block-horz label{ display: block; } .horizontal-select .block-horz{ display: block; padding-right: 0px; } .horizontal-select button#submitCascadeSearch{ display: block; background-color: #333; width: 100%; color: white; } .horizontal-select:nth-child(4n+1) { clear: left; } .horizontal-select:nth-child(4n) { padding-right: 0px; } .horizontal-select:nth-child(1) { padding-left: 0; padding-right: 15px; } @media (max-width: 767px) { .horizontal-select:nth-child(4n+1) { clear: none; } .horizontal-select:nth-child(2n) { clear: none; padding-right: 0px; padding-left: 15px; } .horizontal-select:nth-child(2n+1) { clear: left; padding-left: 0px; padding-right: 15px; } .horizontal-select { width: 50%; } } @media (max-width: 479px) { .horizontal-select { width: 100%; padding-right:0px ; padding-left:0px ; } .horizontal-select:nth-child(n) { clear: none; padding :0 0; } } .vertical-select { display: block; float: left; width: 100%; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; } .vertical-select .block-horz label{ display: block; } .vertical-select button#submitCascadeSearch{ display: block; background-color: #333; width: 100%; color: white; } .vertical-select:nth-child(4n+1) { clear: left; } .cascade_search_vertical button { width: 100%; } @media (max-width: 767px) { .horizontal-select:nth-child(4n+1) { clear: none; } .horizontal-select:nth-child(2n+1) { clear: left; } .horizontal-select { width: 50%; } } @media (max-width: 479px) { .horizontal-select { width: 100%; } } .custom-dropdown { width: 100%; } .custom-dropdown--large { font-size: 1.5em; } .custom-dropdown--small { font-size: .7em; } .custom-dropdown__select select{ width: 100%; padding: .5em; /* add some space*/ margin: 0; /* remove default margins */ } .custom-dropdown__select--white select { background-color: #333; color: white; } @supports (pointer-events: none) and ((-webkit-appearance: none) or (-moz-appearance: none) or (appearance: none)) { .custom-dropdown { position: relative; display: inline-block; vertical-align: middle; } .custom-dropdown__select select { padding-right: 2.5em; /* accommodate with the pseudo elements for the dropdown arrow */ border: 0; -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer; } .custom-dropdown::before, .custom-dropdown::after { content: ""; position: absolute; pointer-events: none; } .custom-dropdown::after { /* Custom dropdown arrow */ content: "\25BC"; height: 1em; font-size: .625em; line-height: 1; right: 1.2em; top: 50%; margin-top: -.5em; } .custom-dropdown::before { /* Custom dropdown arrow cover */ width: 2em; right: 0; top: 0; bottom: 0; border-radius: 0 3px 3px 0; } .custom-dropdown__select[disabled] select{ color: rgba(0,0,0,.3); } .custom-dropdown.custom-dropdown--disabled::after { color: rgba(0,0,0,.1); } /* White dropdown style */ .custom-dropdown--white::before select { top: .5em; bottom: .5em; background-color: #fff; border-left: 1px solid rgba(0,0,0,.1); } .custom-dropdown--white::after select{ color: rgba(0,0,0,.9); } /* FF only temp fix */ @-moz-document url-prefix() { .custom-dropdown__select select { padding-right: .9em } .custom-dropdown--large .custom-dropdown__select select { padding-right: 1.3em } .custom-dropdown--small .custom-dropdown__select select{ padding-right: .5em } } } .submitCascadeSearch { background: #333; background-image: -webkit-linear-gradient(top, #333, #333); background-image: -moz-linear-gradient(top, #333, #333); background-image: -ms-linear-gradient(top, #333, #333); background-image: -o-linear-gradient(top, #333, #333); background-image: linear-gradient(to bottom, #333, #333); color: #ffffff; padding: 7.5px 0px 7.5px 0px; text-decoration: none; border : none; } .submitCascadeSearch:hover { background: #8b8a8a; background-image: -webkit-linear-gradient(top, #8b8a8a, #8b8a8a); background-image: -moz-linear-gradient(top, #8b8a8a, #8b8a8a); background-image: -ms-linear-gradient(top, #8b8a8a, #8b8a8a); background-image: -o-linear-gradient(top, #8b8a8a, #8b8a8a); background-image: linear-gradient(to bottom, #8b8a8a, #8b8a8a); text-decoration: none; } Link to comment Share on other sites More sharing options...
poisson Posted June 23, 2016 Share Posted June 23, 2016 Pour moi l'idéal serait d'utiliser bootstrap en modifiant ton fichier tpl et mettre la taille de chaque select et button à 100% dans ton .css ou .scss Link to comment Share on other sites More sharing options...
Jokeriders Posted June 25, 2016 Author Share Posted June 25, 2016 pas assez calé pour ca :/ a la ligne 4 j'ai modifié "width: 20%;" 20% est le bon compromis pour placer 5 cases mais la 5eme va systematiquement la ligne du dessous. Link to comment Share on other sites More sharing options...
Marvin Lamart Posted June 25, 2016 Share Posted June 25, 2016 Bonjour, 20% aurait été bon si tes cases étaient collées, le problème la c'est qu'il y a un margin sur les cases qui fausse le calcul. (20% x 5) + Margin > 100% D'où le fait que la dernière case passe en bas Link to comment Share on other sites More sharing options...
Jokeriders Posted June 25, 2016 Author Share Posted June 25, 2016 Oui j'ai pensé à ça de suite, J'ai testé à 10% les cases sont bien plus petites mais la 5eme descend toujours Link to comment Share on other sites More sharing options...
Marvin Lamart Posted June 25, 2016 Share Posted June 25, 2016 Je viens de regarder ton site, enfait il y une propriété qui oblige les cases à partir en dessous. .horizontal-select:nth-child(4n+1) { clear: left; } Qui enlève le flottement toute les 4 cases Link to comment Share on other sites More sharing options...
Jokeriders Posted June 25, 2016 Author Share Posted June 25, 2016 Je la supprime et c'est good Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now