Проблема с Css. Я не могу заставить его правильно выглядеть на мобильном устройстве.CSS

Разбираемся в CSS
Ответить Пред. темаСлед. тема
Гость
 Проблема с Css. Я не могу заставить его правильно выглядеть на мобильном устройстве.

Сообщение Гость »

"У меня проблема: на моем компьютере все выглядит нормально, но на мобильном телефоне все ужасно. Больше всего проблем вызывают поля; на мобильном телефоне я не могу заставить их располагаться одно под другим . Кто-нибудь может мне помочь?"
Вот изображения того, что происходит НАСТОЛЬНЫЙ ХОРОШИЙ ,, Телефон ,,Телефон 2 ,,Телефон 3.
/* Body styling */
body {
font-family: 'Arial', sans-serif;
background-color: #f2f2f2;
margin: 0;
}

/* Styling for container */
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center; /* Added to vertically center the content */
min-height: 100vh;
}

/* Styling for calculator container */
.calculator-container {
width:794px;
transform:translatex(835px) translatey(192px);
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: center;
margin-top: 20px;
}

/* Styling for summary tab */
.summary-tab {
width:820px;
transform:translatex(823px) translatey(203px);
height:310px;
line-height:9.4px;
background-color: #fff;
padding: 10px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: center;
margin-top: 20px;
}

h1 {
color: #333;
}

label {
display: block;
margin: 10px 0;
color: #555;
}

select, input {
margin: 5px 0 15px;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
width: 100%;
box-sizing: border-box;
}

button {
background-color: #4caf50;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s;
}

button:hover {
background-color: #45a049;
}

#totalPrice {
margin-top: 20px;
font-size: 18px;
font-weight: bold;
color: #333;
margin-left: 18px;
}

#dimensions {
height:127px;
display: flex;
flex-direction: column;
align-items: center;
}

#heightLabel {
display: none;
}

@media (min-width: 600px) {
#dimensions {
flex-direction: row;
justify-content: space-between;
}
}

/* Styling for color options */
.color-options {
column-gap: 20px;
display: flex;
flex-wrap: wrap;
margin-bottom: 5px;
row-gap: 10px;
}

/* Styling for individual color option */
.color-options input[type="radio"] {
display: none;
}

.color-options label {
display: flex;
align-items: center;
cursor: pointer;
border: 2px solid #ddd;
padding: 5px;
border-radius: 5px;
}

/* Styling for selected color option */
.color-options input[type="radio"]:checked + label {
background-color: #ddd;
font-weight: bold;
}

/* Label */
.calculator-container label{
text-align:left;
font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;
font-size:19px;
line-height:21px;
}

/* Styling for file upload */
#fileSection {
margin-top: 15px;
}

#fileNameDisplay {
margin-top: 10px;
font-style: italic;
color: #555;
}

/* Background image styling */
body {
background-image: url("bcg.png");
background-color: #cccccc;
}

/* Styling for summary tab */
.summary-tab {
background-color: #fff;
padding: 10px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: center;
margin-top: 20px;
margin-bottom: 20px; /* Added margin-bottom to create space between summary and next element */
}

.summary-tab h4 {
color: #333;
}

.summary-tab div {
margin-top: 30px;
font-size: 18px; /* Adjust the font size to match your design */
color: #000000;
margin-right: 80px;
margin-bottom: 80px;
margin-left: 80px;
}

/* Styling for motor options */
#motorSection {
display: none;
margin-top: 15px;
}

.motor-options {
column-gap: 20px;
display: flex;
flex-wrap: wrap;
margin-bottom: 5px;
row-gap: 10px;
}

.motor-options input[type="radio"] {
display: none;
}

.motor-options label {
display: flex;
align-items: center;
cursor: pointer;
border: 2px solid #ddd;
padding: 5px;
border-radius: 5px;
}

.motor-options input[type="radio"]:checked + label {
background-color: #ddd;
font-weight: bold;
}

#totalSummary p.empty-option {
font-weight: bold;
font-size: larger;
}

/* Styling for other options */
.material-options {
margin-top: 10px;
text-align:left;
}

.material-options input[type="radio"] {
display: none;
}

.material-options label {
display: inline-block;
cursor: pointer;
}

.material-options label::before {
content: '';
display: inline-block;
width: 20px;
height: 20px;
border: 2px solid #ccc;
border-radius: 50%;
margin-right: 5px;
vertical-align: middle;
}

.material-options input[type="radio"]:checked + label::before {
background-color: #007bff;
border-color: #007bff;
}

/* Styling for email form container */
#emailFormContainer {
display: none; /* Initially hide the email form container */
}

/* Dropdown Meni */
#itemDropdown{
width:277px;
position:relative;
left:-257px;
background-color:#f3f5f5;
}

/* Za Duzinu text */
.duzina label {
position:relative;
top:-94px;
left:366px;
}

/* Za Duzinu */
.duzina input[type="number"] {
width: 277px;
position:relative;
top:-94px;
left:103px;;
background-color:#f3f5f5;
}

/* Za Visinu text */
.visina label {
position:relative;
left:366px;
top:-143px;
}

/* Za Visinu */
.visina input[type="number"] {
width: 277px;
position:relative;
left:-8px;
top:20px;
background-color:#f3f5f5;

}

/* Za Sirinu text */
.sirina label {
position:relative;
top:-53px;
}

/* Za Sirinu */
.sirina input[type="number"] {
width: 277px;
position:relative;
left:-257px;
top:-49px;
background-color:#f3f5f5;

}

/* Kalendar */
#datepickerSection {
display: none; /* Hide the date picker section by default */
margin-top: 10px; /* Adjust the margin as needed */
}

.datum-text {
display: block;
margin-bottom: 5px;
color: #555; /* Adjust the color as needed */
}

.datepicker {
background-color:#f3f5f5;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
width: 277px;
position:relative;
left:-257px;
box-sizing: border-box;
}

/* Za upload formu*/
.upload {
width: 277px;
position:relative;
left:-318px;
width:123px;
}

/* Upload buton */
.upload {
display: inline-block;
padding: 8px 16px;
background-color: #007bff; /* Change the background color as needed */
color: #fff; /* Change the text color as needed */
border-radius: 4px;
cursor: pointer;
}

/* Upload kad se prelazi misem*/
.upload:hover {
background-color: #0056b3; /* Change the background color on hover */
}

/* Za text ime slike */
#fileNameDisplay {
position:relative;
left:-200px;
color:#ee4390;
}

/* Greska odabrani fajl nije slika staviti tamo funkciju da direktno iz css ubacuje odavde */
.error-text1 {
color: red;
}

/* X dugme otkaze upload slike */
.cancel-button {
background-color: transparent;
color: red;
border: none;
cursor: pointer;
font-size: 16px;
margin-left: 5px; /* Adjust as needed */
}

"Я перепробовал все, ожидая, что эти поля будут расположены одно под другим в правильном порядке." Пробовал
@media all and (min-width:960px) and (max-width: 1024px) {
/* put your css styles in here */
}

@media all and (min-width:801px) and (max-width: 959px) {
/* put your css styles in here */
}

@media all and (min-width:769px) and (max-width: 800px) {
/* put your css styles in here */
}

@media all and (min-width:569px) and (max-width: 768px) {
/* put your css styles in here */
}

@media all and (min-width:481px) and (max-width: 568px) {
/* put your css styles in here */
}

@media all and (min-width:321px) and (max-width: 480px) {
/* put your css styles in here */
}

@media all and (min-width:0px) and (max-width: 320px) {
/* put your css styles in here */
}

not working


Подробнее здесь: https://stackoverflow.com/questions/782 ... -on-mobile
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «CSS»