T
T
Taras Serevann2015-09-15 20:30:07
JavaScript
Taras Serevann, 2015-09-15 20:30:07

How to disable text responsiveness in boostrap?

Hello.
I have the following page: click
using twitter bootstrap.
The problem is this: bootstrap increases the text size (fontSize) when the screen size increases, which is why the entire layout is sprawling. (you can check it by changing the scale in chrome: ctrl + minus)
Who knows how to fix this? How to disable text size increase when the screen is enlarged?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Y
yastas, 2019-04-19
@yastas

Hey! By the way, we support students in many places, if there are still difficulties, feel free to write, all passwords are here: https://yandex.ru/support/praktikum/feedback.html :)
Now for your question: you need to take out the lines
var red = prompt('Enter the saturation of red as a number between 0 and 255');
var green = prompt('Enter green saturation as a number from 0 to 255');
var blue = prompt('Enter the saturation of blue as a number between 0 and 255');
Before the start of the makeColorString() function. Prompt dialogs are the first thing we ask the user, which means these three lines should be the very first in the code. At the end of each dialog, you need to put down the default values, for red - 255, for green and blue - 0. The lines will take the following form:
var red = prompt('Enter the saturation of red as a number between 0 and 255', 255);
var green = prompt('Enter green saturation as a number from 0 to 255', 0);
var blue = prompt('Enter the saturation of blue as a number between 0 and 255', 0);
All other lines that refer to the declaration of the variables red, green and blue can be removed. These are the following lines:
var red = 255;
var green = 0;
var blue = 0;
var red = prompt('255');
vargreen = prompt('0');
var blue = prompt('0');
At the beginning of the makeColorString() function, we declare the var bgValue variable and its value:
var bgValue = 'rgb(' + red + ', ' + green + ', ' + blue + ')';
variable = Number(variable) for red and blue, and variable = +variable for green. In the if blocks for green and blue, you need to check the texts - the prompt() dialogs and console calls show the text for red, but should show for blue and green, as variable names.
After the three if conditionals at the end of the function, there should be three calls to console.log():
console.log(bgValue);
console.log(red + green + blue);
console.log(isNaN(red));
And that's it :)

P
plushka71, 2019-04-19
@plushka71

TK Answer!
var red = 255;
function makeColorString() {
if (isNaN(red)) {
red = prompt('You did not enter a number as the red saturation value. Please enter a number between 0 and 255.', 255);
red = number(red);
} else if (red < 0) {
red = 0;
console.log('The smallest possible number is zero, we have substituted the value 0.');
} else if (red > 255) {
red = 255;
console. log('The highest possible number is 255, we've substituted it.');
} else {
console. log('You have defined red saturation as ' + red);
}
}
var green = 0;
function makeColorString() {
if (isNaN(green)) {
green = prompt('You did not enter a number for green saturation. Please enter a number between 0 and 255.', 0);
green = Number(green);
} else if (green < 0) {
green = 0;
console.log('The smallest possible number is zero, we have substituted the value 0.');
} else if (green > 255) {
green = 255;
console. log('The highest possible number is 255, we've substituted it.');
} else {
console.log('You have set the saturation of green to ' + green);
}
}
var blue = 0;
function makeColorString() {
if (isNaN(blue)) {
blue = prompt('You did not enter a number for the blue value. Please enter a number between 0 and 255.', 0);
blue = number(blue);
} else if (blue < 0) {
blue = 0;
console.log('The smallest possible number is zero, we have substituted the value 0.');
} else if (blue > 255) {
blue = 255;
console. log('The highest possible number is 255, we've substituted it.');
} else {
console.log('You have defined the saturation of blue as ' + blue);
}
}
var bgValue = 'rgb(' + red + ', ' + green + ', ' + blue + ')';
console.log(bgValue);
varred = prompt('
var green = prompt('Enter green saturation as a number from 0 to 255', '0');
var blue = prompt('Enter the saturation of blue as a number from 0 to 255', '0');
red = number(red);
blue = number(blue);
green = +green;
console.log(red + blue);
console.log(isNaN(red));

S
Sergey, 2015-09-15
@gangstarcj

Remove styles that change font size

T
Therapyx, 2015-09-15
@Therapyx

There, most likely, the text is not in px, but in REM. Search through control + F and change further as you like)

S
ShamblerR, 2015-09-18
@ShamblerR

Still, your setup is weird.
you have a problem with the layout and you are trying to disable the adaptive of the bootstrap.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question