CSS calc width and height values

0 votes

How can I calculate the screen height using CSS and then use the result for the width calculation? Is it even conceivable?

myClass{    
    height: calc(60% - 34.5px);
    width: heightReturnedValue*1.3
}
Aug 3 in CSS by Edureka
• 11,040 points
47 views

1 answer to this question.

0 votes

Yes, there are CSS variables named vh (viewport height) and vw (viewport width) (viewport width). The screen is the viewport.

myClass {    
  height: calc(50% - 33.5px);
  width:  calc(100vh * 1.3);
}
answered Aug 4 by Tanishqa
• 700 points

Related Questions In CSS

0 votes
1 answer

Why vh works and % doesn't? (height css)

The height of an element, by default, ...READ MORE

answered Jun 10 in CSS by Edureka
• 9,540 points
141 views
0 votes
1 answer

Set cellpadding and cellspacing in CSS?

For controlling "cellpadding" in CSS, you can ...READ MORE

answered Jun 10 in CSS by Edureka
• 9,540 points
21 views
0 votes
1 answer

Setting top and left CSS attributes

You can alternatively use the setProperty method, ...READ MORE

answered Jun 10 in CSS by Edureka
• 9,540 points
28 views
0 votes
1 answer

How to create material design input form using css and bootstrap?

Try with this code. HTML: <div class="main_div"> ...READ MORE

answered Jun 21 in CSS by Edureka
• 9,540 points
276 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
4,973 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,240 points
1,730 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,350 points
292 views
0 votes
1 answer

What is the difference between span and div?

The div should be used to wrap sections of ...READ MORE

answered Jan 16, 2020 in Web Development by Niraj

edited Jan 21, 2020 by Niroj 2,363 views
0 votes
1 answer

Vertical and horizontal align (middle and center) with CSS?

There are many methods : Center horizontal and ...READ MORE

answered Aug 3 in CSS by Tanishqa
• 700 points
60 views
0 votes
1 answer

HTML and CSS: What do the <ul> and <li> tags stand for?

The term ul stands for unordered list. ...READ MORE

answered Aug 4 in CSS by Tanishqa
• 700 points
36 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP