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 6699989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:45:40+00:00 2026-05-26T06:45:40+00:00

Building a fairly basic website in MVC3 (overkill at the moment, but want it

  • 0

Building a fairly basic website in MVC3 (overkill at the moment, but want it to be easily expandable). Anyway, I’ve tried what I know how to do, but I’m not incredibly good at javascript. I’ve searched online and tried a few different options with javascript, but nothing seems to solve my Chrome issue.

I have seen a suggestion to use a background image to give the illusion of what I’m wanting, but I’d prefer to have it done with jquery and css modification. Let me know if you need more information…I’m still just shocked that Chrome is the browser that is giving me an issue…

The javascript/html for the layout page…

<head>
    <meta content="charset=utf-8" />
    <title>@ViewBag.Title</title>
    <link rel="shortcut icon" href="@Url.Content("~/Content/images/favicon.ico")" />
    <link rel="icon" type="image/gif" href="@Url.Content("~/Content/images/animated_favicon1.gif")" />
    <link href="@Url.Content("~/Content/CSS/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
</head>

<body>
    <div id="body">
        <div id="SiteLogo">
            <img alt="Logo" src="@Url.Content("~/Content/images/Logo.png")" height="100" width="100" />
        </div>
        <div id="SiteBanner">
            <br />
            <em>@quote[quoteSelect]</em>
            <br /><br />
            <em id="BannerQuoteBy">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@quoteBy[quoteSelect]</em>
        </div>
        <div class="ClearBoth"></div>
        <div id="NavAndBody">
            <div id="SiteLinkColumn">asdf
            </div>
            <div id="SiteBody">
                @RenderBody()
            </div> 
            <div class="ClearBoth"></div>
        </div>
    </div>
    <script type="text/javascript">$(document).ready(function(){$("#SiteLinkColumn").css({'height':($("#SiteBody").height()+'px')});})</script>
    <script type="text/javascript">alert($("#SiteBody").height());</script>
</body>

And then the partial pages look like…(it doesn’t matter which page I use they all don’t line up).

@{
    ViewBag.Title = "About";
}
<div class="FloatLeft" style="padding:10px;">
    <img width="350px" src="@Url.Content("~/Content/images/Logo.png")" alt="Logo" />
</div>
<p>
    <img alt="Bullet" width="15px" src="@Url.Content("~/Content/images/Logo.png")" /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque erat enim, gravida ac hendrerit non, ornare a purus. Integer sit amet lacinia odio. Morbi sit amet auctor metus. In bibendum nibh vitae orci consequat et ultrices neque fermentum. Aliquam diam ligula, hendrerit sit amet scelerisque quis, gravida et velit. Integer in felis non dui varius convallis. Nam nec elit sit amet ligula volutpat tincidunt. Cras lacus libero, porta at commodo sed, auctor vitae quam. Fusce nec metus dolor, eu fringilla ipsum. Aliquam nec commodo urna.
</p>

The css that is applied to the divs before javascript gets it’s hands on it…

#SiteLinkColumn {
    height: auto;
    width: 98px;
    float: left;
    border: 1px solid #97F78A;
}
#SiteBody {
    float: left;
    height: 100%;
    width: 798px;
    border: 1px solid #97F78A;
    margin-left: 10px;
}

Also as requested I added the alert…and I also did an alert on document.ready. In Chrome the alert is generated before the images are populated (firefox and ie alert after image population) and the images cause the div to expand so I’m guessing this is the issue and to confirm it I removed all the images from one of the pages and it then lined up correctly in all three browsers.

However, I’m not aware of any way to solve this so if someone can point me in the right direction or if you know the solution posting it… (would the version of jquery that I’m using have anything to do with this???)

  • 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-05-26T06:45:41+00:00Added an answer on May 26, 2026 at 6:45 am

    Found solution after I found the problem based off of @Coulton ‘s hint…
    Official way to ask jQuery wait for all images to load before executing something

    Needed to use $(window).load instead of $(document).ready

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just started learning mvc3. I've built a fairly basic website (also using EF-Code-First if
I'm building a fairly large website and my .htaccess is starting to feel a
I am building a small website for fun/learning using a fairly standard Web/Service/Data Access
This project is in PHP, but is fairly language agnostic. I'm building a project
I am fairly new to unit testing. I am building an ASP.NET MVC3 application
I'm building a fairly large website in Django, and it's my first time doing
Hey guys, Im building a fairly large website here, I am using quite a
A friend and I are building a fairly complex website based on java. (PHP
I am building a fairly simple website based on typo3. I'm new to the
I'm building a J2EE application in which I want to allows plugins. I'm fairly

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.