Jump to content
  • 0

CSS и размеры кнопки


LabaZu
 Share

Question

Всем привет.

Помогите, пожалуйста, со следующей проблемой...

Имеется код кнопки:


***
<form action="" id="cse-search-box">
***
<button class="Button" type="submit" name="" tabindex="" style="margin-left: -60px; margin-top: 10px; text-align:justify;">
<span class="btn">
<span class="t">
Поиск
</span>
<span class="r">
<span></span>
</span>
<span class="l"></span>
</span>
</button>
***
</form>
***

К ней применены следующие стили оформления:


/* Search Form */

#cse-search-box button.Button, a.Button
{
position:relative;
display:inline-block;
width: auto;
outline:none;
border:none;
background:none;
line-height:34px;
margin:0;
padding:0;
overflow: visible;
cursor: default;
text-decoration: none !important;
}

#cse-search-box .Button .btn
{
position: relative;
overflow: hidden;
display: block;
width: auto;
z-index: 0;
height: 34px;
color: #1C1C1C;
white-space: nowrap;
float: left;
margin-left: 60px;
}

#cse-search-box .Button .t
{
height:34px;
white-space: normal;
padding: 0 24px;
font-family: Tahoma, Arial, Helvetica, Sans-Serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
text-align: left;
line-height: 34px;
text-decoration: none !important;
}

#cse-search-box .Button .active
{
color: #F2F2F2;
}

#cse-search-box .Button .hover, a.Button:hover
{
color: #FBF5E5;
text-decoration: none !important;
}

#cse-search-box .Button .active .r
{
top: -68px;
}

#cse-search-box .Button .hover .r
{
top: -34px;
}

#cse-search-box .Button .r
{
display: block;
position: absolute;
overflow: hidden;
z-index: -1;
top: 0;
right: 0;
width: 9px;
height: 102px;
}


#cse-search-box .Button .r span
{
display: block;
position: absolute;
overflow: hidden;
z-index: -1;
top: 0;
right: 0;
width:411px;
height: 102px;
}


#cse-search-box .Button .active .l
{
top: -68px;
}

#cse-search-box .Button .hover .l
{
top: -34px;
}

#cse-search-box .Button .l
{
display: block;
position: absolute;
overflow: hidden;
z-index: -1;
top: 0;
left: 0;
right: 9px;
height: 102px;
}


#cse-search-box .Button .l, .Button .r span
{
background-image: url('images/ButtonFind.png');
}

***

Файлик ButtonFind.png выглядит следующим образом:

buttonfind.png

Интересует изменение высоты и ширины кнопки При изменении height и width картинка кнопки обрезается, что не приемлемо ;(

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Есть несколько вариантов:

1) Используйте CSS3 для стилизации. А пользователи ИЕ пусть идут лесом.

2) Упростите дизайн кнопки. Чтобы ее можно было стилизовать средствами CSS2.1

3) Используйте один из методов закругления углов из этой темы.

Link to comment
Share on other sites

  • 0

К сожалению, человека, оставившего оформление, распросить не удасться,.. но хотелось бы оставить приведённый в первом посте код... Есть ещё соображения ? Если будет совсем глухо - буду пробывать предложенные варианты (но это на крайний случай и за них спасибо :rolleyes: )

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.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   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.

 Share

  • Обсуждения

    • Актуальные контакты: Telegram: @Nikker_web E-Mail:   tarasevich.email@gmail.com Портфолио https://www.behance.net/d4d4186e Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ    
    • Актуальные контакты: Telegram: @Nikker_web E-Mail:   tarasevich.email@gmail.com   Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ   Портфолио https://www.behance.net/d4d4186e
    • Доброго всем времени суток. Прошу помощи. Научите принципу изменения футера. Движок Xenforo. Версия 2.2.10. Стиль дефолтный. Что именно нужно в итоге на фото примере. Мой шаблон app.footer less имеет следующее значение.  .p-footer { .xf-publicFooter(); a { .xf-publicFooterLink(); } } .p-footer-inner { .m-pageWidth(); .m-pageInset(); padding-top: @xf-paddingMedium; padding-bottom: @xf-paddingLarge; } .p-footer-row { .m-clearFix(); margin-bottom: -@xf-paddingLarge; } .p-footer-row-main { float: left; margin-bottom: @xf-paddingLarge; } .p-footer-row-opposite { float: right; margin-bottom: @xf-paddingLarge; } .p-footer-linkList { .m-listPlain(); .m-clearFix(); > li { float: left; margin-right: .5em; &:last-child { margin-right: 0; } a { padding: 2px 4px; border-radius: @xf-borderRadiusSmall; &:hover { text-decoration: none; background-color: fade(@xf-publicFooterLink--color, 10%); } } } } .p-footer-rssLink { > span { position: relative; top: -1px; display: inline-block; width: 1.44em; height: 1.44em; line-height: 1.44em; text-align: center; font-size: .8em; background-color: #4682B4; border-radius: 2px; } .fa-rss { color: white; } } .p-footer-copyright { margin-top: @xf-elementSpacer; text-align: center; font-size: @xf-fontSizeSmallest; } .p-footer-debug { margin-top: @xf-paddingLarge; text-align: right; font-size: @xf-fontSizeSmallest; .pairs > dt { color: inherit; } } @media (max-width: @xf-responsiveMedium) { .p-footer-row-main, .p-footer-row-opposite { float: none; } .p-footer-copyright { text-align: left; padding: 0 4px; // aligns with other links } }  
    • Нужны сайты с примерами верстки, типа https://css-tricks.com/. Типовые приемы и нестандартные на все случаи жизни. Накидайте ссылок.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy