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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:14:36+00:00 2026-05-28T11:14:36+00:00

i have this … <section class=cat> <article class=layer></article> <article class=layer></article> <article class=layer></article> <article class=layer></article>

  • 0

i have this …

<section class="cat">
   <article class="layer"></article>
   <article class="layer"></article>
   <article class="layer"></article>
   <article class="layer"></article>
</section>

<section class="cat">
   <article class="layer"></article>
   <article class="layer"></article>
   <article class="layer"></article>
</section>

And I want to set the height of each section.cat to the height of all its children.
I wanna do this with jquery so I’m compatible in all browsers. It seems like there is no way to this with pure css as my article.layers are set to display:table…

article.layer {
    position: relative;
    display: table;
    height: 100%;
    width: 100%;
}

So all articles are 100% the height of the current viewport as my body and html are set to 100% height as well.

Right now section.cat is set to display:inline which works in most browsers but doesn’t in Safari 5.0.

section.cat {
    display:inline;
}

So therefore I want to do this with jquery and get the height of each child inside section.cat and set its height to this value. Otherwise the height of section.cats is 0 and as mentioned above Safari 5.0 somehow can’t deal with the display:inline value.

Thank you!

  • 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-28T11:14:37+00:00Added an answer on May 28, 2026 at 11:14 am

    I would suggest you to find css equivalent for to to solve but still if you want jQuery solution then here it is.

    var totalHeight;
    $(".cat").each(functon(){
       totalHeight = 0;
       $(this).children(".layer").each(function(){
          totalHeight += $(this).height();
       })
       $(this).height(totalHeight);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used this code in my AS3 document class to remove all objects
I have this fsField is the class of all elements in the form. So
I have the following html: <article class=layer id=one> </article> <article class=layer id=two> </article> <article
I have this line in the declarations section: Private filePath As String And something
I have been trying to get this one section of my UI to immediatly
I've read this book section about git branches. I have create a branch called
I have a section of makefile that has this sort of structure: bob: ifdef
This is what I have typed in the footer message section from the site
i have a small problem i have xome xml with a cdata section. This
I have this code in jQuery, that I want to reimplement with the prototype

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.