Jump to content
  • 0

Подскажите, как изменить размер элемента "radiobutton" в стилях?


osetr
 Share

Question

Когда меняю размер следующим образом, то все работает

<input type="radio" class="radioBtn" style="width:250px; height:250px;"name="sel" id="sel_adr">

Но когда так же делаю через стиль, то почему-то не работает. В чем может быть причина?

.radioBtn {    width: 250px;    height: 250px;}
<input type="radio" class="radioBtn" name="sel" id="sel_adr">
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Что-то ни как не найду. Может в коде поможете найти.

Делаю приложение для смартфонов, по-этому использую @media. И не работает на смартфоне, где 1ый вариант @media. А на обычном мониторе (где @media 1024) все работает.

Стили:

.block1 {    width: 100%;     height: 100%;}.block2 {    width: 100%;     height: 100%;}@media only screen and (min-device-width: 320px) and (max-device-width: 359px){.block1 {     //padding: 5px;    float: center;    font-size: 100px;    background: #ffc;}.block2 {    font-size: 100px;    float: center;    height: 500px;        width: 1280px; }.radioBtn {    width: 250px;    height: 250px;}.selScl {    width : 750px;    height : 100px;    font-size : 50px;    background : #fff;}.inpName {    width : 600px;    height : 100px;    font-size : 70px;}.inpLun {    width : 150px;    height : 100px;    font-size : 70px;}.inp {    width : 750px;    height :100px;    font-size: 70px;}.sclAdr {    width : 600px;    height : 100px;    font-size : 70px;}.sclLun {    width : 150px;    height : 100px;    font-size : 70px;}.weightInput {    margin-top:40px;    width :400px;             height:150px;    background: #ffc;    font: 70px ArialBlack;    text-align :center;}    .weightBtn {    width :400px;             height: 150px;    background: #f92;    margin-top:30px;    font-size: 65px;}.informNb {    font-size:30px;}    select, .inp {    height : 100px;    font : 50px Arial;    background : #fff;}select:disabled, .inp:disabled {    background: #fff;}}@media only screen and (min-device-width: 360px){.block1 {     width: 360px;     height: 640px;    //padding: 5px;    float: center;  background: #ccc;  }}@media only screen and (min-device-width: 1024px){.block1 {     font-size: 100px;    width: 1280px;     height: 1024px;    //padding: 5px;    float: center;  background: #000;  }}

хтмл:

  '<div class="block1" align="center"'||	'<input type="hidden" name="p_sel" value="X">'||	'Список:'||  '<br></div>'||  '<div class="block2" align="center">'||  '<input type="radio" class="radioBtn" style="width:200px; height:200px;"name="sel" id="sel_name" checked>'||  '<input type="radio" class="radioBtn" style="width:100px; height:100px;"name="sel" id="sel_adr"></div>'||
Link to comment
Share on other sites

  • 0

как-то странно у вас:

@media only screen and (min-device-width: 320px) and (max-device-width: 359px){

и при этом в .block1:

    height: 500px;        width: 1280px; 

и так по всему коду...

а что за одинарные кавычки в html?

попробуйте вот так:

input.radioBtn[type="radio"] {    width:...;    height:...;}
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