pufAmuf
pufAmuf

Reputation: 7805

set container height to a div height + add 100 pixels

I have this function

$(".container").width('1052').height($(".right").height());

And in the function the .container height is set by the .right height. Well, I also always want to add a 100 pixels to that number. How would I achieve that?

Is this possible without creating a separate variable? Thanks :)

Upvotes: 4

Views: 9519

Answers (2)

sidyll
sidyll

Reputation: 59307

Maybe add a literal 100?

$(".container").width('1052').height($(".right").height()+100);

Upvotes: 8

Sahil Muthoo
Sahil Muthoo

Reputation: 12506

$(".container").width('1052').height($(".right").height() + 100);

Upvotes: 1

Related Questions