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

  • SEARCH
  • Home
  • 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 409345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:46:52+00:00 2026-05-12T17:46:52+00:00

Trying to add dynamic borders on my website top, left, and right sides… The

  • 0

Trying to add dynamic borders on my website top, left, and right sides… The pages on my site are dynamic… That is they change… I need to have a script that adapts a div to the webpage simply…

Anyone know this?
I got this script from some guy on this forum, but I am trying to avoid jQuery (don’t ask)…

<p class="bgr">Content content content</p>
<script type="text/javascript">
$('.bgr').each(function(i,el){
$('<div class="bgr_left"/>').height($(this).height()+'px').appendTo($(this));
// similar for top, right, and bottom
});
</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-05-12T17:46:52+00:00Added an answer on May 12, 2026 at 5:46 pm

    Calculating dimensions in a cross-browser fashion (as the height() you’re fetching and setting there) is an incredibly tedious task to do in plain JavaScript. That’s, among other reasons, why libraries such as jQuery were built in the first place.

    I’d strongly advise you NOT to do it without any framework – if you don’t like jQuery, fine, but use another one.

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

Sidebar

Related Questions

I'm a wordpress newbie trying to add dynamic posts and pages through get requests.
I'm trying to add the functionality to this dynamic order form that will auto
I have jquery mobile site, trying to add a gmap (v3) with dynamic markers:
I am trying to add dynamic tabs to my application. Right now if I
Trying to add a dynamic class value to one of my columns in CGridView:
I'm trying to add details to a database by using ajax and table dynamic
Is there any way to create a dynamic Pinterest button? I'm trying to add
So, I'm trying to make a dynamic UI, and i want to add a
I'm trying to use jQuery to add dynamic Add/Remove row function, but I meet
I am trying to add dynamic form fields to jsf form. But even following

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.