Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to expand both sides to fit browser window?

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #240231
    doodu
    Participant

    div 1 = width:100%; background:grey;

    div 2 = width:940px; background: grey;

    div 3 = width:940px; background: white;

    is there any option in css to expand the both sides? The “content” should be in center as width:940px and then I need to expand both sides to fit browser window.

    Example:
    if it is a 1440 screen then “content” = 940px and left & right side should be expand to 250px.

    if it is a 1640 screen then “content” = 940px and left & right side should be expand to 350px.

    #240233
    Paulie_D
    Moderator

    Yes…but it depends on what it is you are trying to do.

    What would be in the ‘side’ sections?

    Why not have a containers that are 100% wide and then any centered inner divs that are needed to be max-940 wide can be added in

    Something like this:

    http://codepen.io/Paulie-D/pen/oGKtA

    #240234
    doodu
    Participant

    I have description tab with 940px. I want to change both sides to WHITE. if some one using a large screen than 940px.

    Plz see the description tab (Product Description, Reviews, Shipping Info) here: https://goo.gl/AVmcXI

    #240235
    Paulie_D
    Moderator

    I’m not clear on what it is you are trying to to here.

    Both sides of what?

    An image of how this is supposed to look would be helpful.

    #240236
    doodu
    Participant

    now it looks like this – http://www.screencast.com/t/jvQTgueOva

    I need to change it like this – http://www.screencast.com/t/qJkV8bJW

    #240238
    Paulie_D
    Moderator

    I’m not seeing a difference to be honest.

    #240240
    doodu
    Participant

    oh no!
    there should be a different.

    I have marked with red circle. plz check now.
    Now it’s looking like this – http://www.screencast.com/t/epP5Swds

    I need it to change like this – http://www.screencast.com/t/8TD56lvFV

    #240241
    Paulie_D
    Moderator

    On closer examination I can see the difference. but this is a little more complex.

    You would need to remove the widths from the various divs and then center the menu somehow.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.