Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9211417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:17:26+00:00 2026-06-18T01:17:26+00:00

I was able to get it determined by the browser which is great (link

  • 0

I was able to get it determined by the browser which is great (link below) but the only problem now is when viewing it on smaller screens it cuts off the content and when refresh the page in google chrome with the browser agent open it cuts off for that too as well.

How can I get the background to fit the browser without cutting off the content.

–link –> How to get an element the same height as browser resolution?

<script type="text/javascript"> 
$(document).ready(function() { 
var height = window.innerHeight; 
$(".bg").css("height", height); }); 
</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:17:28+00:00Added an answer on June 18, 2026 at 1:17 am

    You can calculate window’s height and width than manipulate to element with these values:

    Here is working jsFiddle.

    var background = $('.wrapper');
    function arrange() {
        var windowH = $(window).height();
        var windowW = $(window).width();
        background.css({'height':windowH+'px','width':windowW+'px','background-size':windowW+'px '+windowH+'px'});
    }
    arrange(); //for setting sizes on load
    
    $(window).resize(function() {arrange();}); //setting size on window resize
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am able to get the current date, but I don't know how to
I am able to get the output of a pdf using fpdf, the problem
I'm finally able to get an Access Token, now I'm very confused as how
I'm not able to get a clear answer on my problem: I want to
not able to get this, can someone help for this LINQ query? select col1,
I am not able to get the hg head or status for a given
I'm not able to get this persistence file correct... I do not find any
I am able to get the current page's url in jsf from back-end bean
I'm able to get the following results with this working query: $query = SELECT
I am not able to get my jwysiwyg and Jhtmlarea text editors to work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.