Webmaster Sun Login
Not a member yet? Sign up

please help me in setting height for div based on another div value

  • HOME
  • FORUMS
  • BLOGS
  • MARKETPLACE
  • ADVERTISING
  • SPECIAL OFFERS
  • WEB HOSTING
  • QUICK MENU
  • REGISTER HERE - Join us for FREE
Results 1 to 4 of 4
    Stick this thread
  1. #1
    Join Date
    May 2017
    Posts
    30
    Thumbs Up/Down
    Received: 2/0
    Given: 1/0
    Thanks
    4
    Thanked 1 Time in 1 Post

    please help me in setting height for div based on another div value

    i have a div as below

    <div class="first" style="height:300px">
    <div class="subone"><img></img></div>
    <div class="subtwo">text</div>
    </div>

    main div height is 300px and the div inside it have a image which have variable height images. and i want the below div height to auto adjust based on the image div height.

    so all the main div "first" are looking equal height.

  2. #2
    Join Date
    May 2016
    Posts
    355
    Thumbs Up/Down
    Received: 35/0
    Given: 515/2
    Thanks
    33
    Thanked 28 Times in 28 Posts
    You wanted to have subtwo div same height with subone automatically?
    sorry I had to reask because I really don't understand your question.

  3. #3
    Join Date
    May 2017
    Posts
    30
    Thumbs Up/Down
    Received: 2/0
    Given: 1/0
    Thanks
    4
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Marc van Leeuwen View Post
    You wanted to have subtwo div same height with subone automatically?
    sorry I had to reask because I really don't understand your question.
    Name:  2017-05-19_18-56-37.png
Views: 15
Size:  107.6 KB

    see the images i have uploaded and in that the images are equal in height so all the grid is equal in height.
    but if the image size increase or decreases than the grid size differ from other grids. so to maintain the grid, if the image size decrease that the below text area should auto adjust its height make it equal to others grids.

    also for image we can set max-height so the image size increases should not affect other grids...

    if you are not clear i will make some image and re explain you

  4. #4
    Join Date
    May 2016
    Posts
    355
    Thumbs Up/Down
    Received: 35/0
    Given: 515/2
    Thanks
    33
    Thanked 28 Times in 28 Posts
    Quote Originally Posted by godmadeus View Post
    Name:  2017-05-19_18-56-37.png
Views: 15
Size:  107.6 KB

    see the images i have uploaded and in that the images are equal in height so all the grid is equal in height.
    but if the image size increase or decreases than the grid size differ from other grids. so to maintain the grid, if the image size decrease that the below text area should auto adjust its height make it equal to others grids.

    also for image we can set max-height so the image size increases should not affect other grids...

    if you are not clear i will make some image and re explain you
    I still can not understand what you wanted.

    can you explain on your design?

    You should explain directly on the design so I can understand and help you out.

    I know html and css, I will try to fix your issues.

Newer Threads

  1. sinu
    Antonio94
    Replies: 18 | Views: 693
    Last post by Antonio94, 06-16-2017, 08:04 AM
  2. Nickberr
    WildSpirit
    Replies: 15 | Views: 1011
    Last post by WildSpirit, Today, 12:51 AM
  3. jayjain
    wms
    Replies: 6 | Views: 180
    Last post by wms, 05-19-2017, 09:12 AM

Older Threads

  1. HostXNow
    Marc van Leeuwen
    Replies: 5 | Views: 527
    Last post by Marc van Leeuwen, 05-19-2017, 02:03 AM
  2. Marc van Leeuwen
    Marc van Leeuwen
    Replies: 0 | Views: 181
    Last post by Marc van Leeuwen, 05-18-2017, 04:46 AM
  3. harrygreen90
    michaelandy
    Replies: 5 | Views: 236
    Last post by michaelandy, 07-15-2017, 05:07 AM
  4. donaldaxon
    AdrianneG
    Replies: 5 | Views: 260
    Last post by AdrianneG, 06-04-2017, 04:06 PM
  5. Marc van Leeuwen
    SEOPub
    Replies: 4 | Views: 236
    Last post by SEOPub, 05-22-2017, 04:00 PM

Latest Threads

  1. PenguinManiac
    tim_cloudcone
    Replies: 2 | Views: 16
    Last post by tim_cloudcone, Today, 09:58 AM
  2. PenguinManiac
    fishmonk
    Replies: 2 | Views: 18
    Last post by fishmonk, Today, 09:15 AM
  3. fishmonk
    fishmonk
    Replies: 0 | Views: 17
    Last post by fishmonk, Today, 12:47 AM
  4. fishmonk
    Questions on Fiverr
    By fishmonk in forum Make Money Online
    fishmonk
    Replies: 0 | Views: 17
    Last post by fishmonk, Today, 12:43 AM
  5. nesir
    Hi All,
    By nesir in forum New Member Introductions
    ulterios
    Replies: 2 | Views: 46
    Last post by ulterios, Yesterday, 11:26 PM

Similar Threads

  1. mark
    jamesnader
    Replies: 1 | Views: 1596
    Last post by jamesnader, 12-10-2015, 10:08 AM
  2. Content by Rhonda
    Setting Goals for 2015
    By Content by Rhonda in forum Online Internet Marketing
    Content by Rhonda
    Replies: 0 | Views: 575
    Last post by Content by Rhonda, 02-19-2015, 02:17 PM
  3. Laviskajoermoy
    How may I enhance height
    By Laviskajoermoy in forum General Discussion
    Dating Expert
    Replies: 7 | Views: 2733
    Last post by Dating Expert, 02-16-2014, 09:45 PM
  4. Adrianne
    Adrianne
    Replies: 0 | Views: 1184
    Last post by Adrianne, 03-20-2013, 07:12 AM
  5. Jkit
    Jkit
    Replies: 0 | Views: 1024
    Last post by Jkit, 07-26-2012, 04:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Internet Marketing Forum

Webmaster Sun is a forum where you’ll find in-depth discussions and resources to help you succeed on the web whether you are new or experienced. You’ll find it all here. With topics ranging from internet marketing, search engine optimization, social networking, make money online, web hosting, affiliate marketing as well as hands-on technical support for web design, programming and more. We are a growing community of like-minded people that is keen to help and support each other with ambitions and online endeavors. Learn and grow, make friends and contacts for life.

Come Hang Out With Us

    Facebook Twitter Webmaster Forum Google+

    Webmaster Sun Logo
Copyright ©2012 - 2017, WebmasterSun.com. All rights reserved. Internet marketing forum for internet marketers, webmasters, web hosting providers, designers and affiliate marketers.

Welcome to Webmaster Sun

The World's Number 1 Webmaster Community, SEO and Marketplace

Log in!

Continue with Facebook
Continue With Email. By signing up you indicate that you have read and agree to the Terms of Service and Privacy Policy.

Sign in Manually

Need an account? Sign up now!