Results 1 to 9 of 9

Thread: Responsive css help please

  1. #1
    Join Date
    Aug 2014
    Location
    Thessaloniki,Greece
    Posts
    26

    Default Responsive css help please

    Let's say I have 2 divs that I want to be aside. Either with float:left,either with display:inline-block.
    The div with id #div1 I want to be responsive with max-width:700px and the div with #div2, I want o have standard width. Let's say 200px.
    I want when the user decreases the size of the browser, the left div (#div1), to minimize it's width, WITHOUT sending the right div (#div2) under.
    I want the right div, to be under, only when REALLY dont fits in the screen.
    And the left div, to behave just like it is alone. To really decrease it's width.
    Is is possible ??? If yes, HOW ????
    I dont use and css framework.

    An example here:http://archipelago-lng.eu/Results/Publications.html

    The left div (the one with the right border), and the right div-column.
    Right now, i'm changing the left div's width, with media queries.
    But, i want to behave just as when it's alone. (minimize it enough), to see that the red border really decreases...

    Thanks in advance

  2. #2
    Join Date
    Aug 2014
    Location
    Thessaloniki,Greece
    Posts
    26

    Default

    I found the solution!

    For those who are interest:
    --------------------------
    <div id="div1">Content 1 here</div>
    <div id="div2">Content 2 here</div>
    <div style='clear:both;'></div>

    <style>
    #div1{float:left; height:auto; min-height:200px; width:calc(100%-220px);}
    #div2{float:left; height:auto; min-height:200px; width:200px;}
    </style>

    Check now , int the above link how smoothly it works!
    Much better than the media queries (i use it know for only one situation, below 500px width)

  3. #3
    Join Date
    May 2014
    Posts
    68

    Default

    Some suggestions i can suggest you are:
    - Use view port meta tag in responsive web design
    - Say clear after the float class comes
    - Use responsive design frameworks which can change their shape according to the screen size.

    If you use a frame work your work will become easier, you can overcome browser compatibility issue also.

  4. #4
    Join Date
    Aug 2014
    Location
    Thessaloniki,Greece
    Posts
    26

  5. #5
    Join Date
    May 2014
    Posts
    111

    Default

    Thanks, This is very informative information.

  6. #6

  7. #7
    Join Date
    Apr 2016
    Location
    Hyderabad
    Posts
    9

    Default

    Thanks for the information

  8. #8

    Default

    Responsive web design helps to adjust the width of the web page in mobile devices. View port meta tag helps to tell us whether we need to make a web page responsive or not.

  9. #9

Similar Threads

  1. css/jquery responsive effect
    By marios.frag in forum Web Design Solutions
    Replies: 6
    Last Post: 04-24-2018, 10:21 AM
  2. #1 VPS Hosting in US Since 1997| 24/7 Responsive Customer Support!
    By HostDepot.Danie in forum Web Hosting and Related Offers Forum
    Replies: 0
    Last Post: 08-01-2014, 07:07 AM
  3. Looking for host with responsive Live Chat
    By Madagaskar in forum Web Hosting Solutions
    Replies: 12
    Last Post: 07-16-2014, 10:54 AM
  4. [WTS] Responsive WHMCS Theme in just $25 + Easy Customization!
    By cosmetologist in forum Web Hosting and Related Offers Forum
    Replies: 0
    Last Post: 01-20-2014, 08:04 AM
  5. [WTS] Responsive WHMCS Theme in just $25 + Easy Customization!
    By cosmetologist in forum Web Hosting and Related Offers Forum
    Replies: 0
    Last Post: 12-26-2013, 02:40 PM

Posting Permissions

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