How to use px and % in the same layout like this

Tags: css

Problem :

I have searched for this question, but I can't find a good solution, so maybe you guys can help me.


If you look at this site, you can see that in each side (left/right), there is a banner. The width for these two are 160px each. the website is using the WHOLE screen at any givin time, but the ads are still 160px no matter what, and the game in the middle is the one shrinking to fit the screen, both vertically and horisontally.

How can I achieve this, and is it even possible to do in css alone? I've looked their code, but I can't really figure it out.

Solution :

Banner provided by thirt pars (like AdSense) can't generally be resized for an obvoius reason: the advertiser provides, one or more images for the banner, possibly of different sizes; but that sizes are generally not intended to be "scalable" 'cause in that case the result might suck...

You can scale the container, of course, but you are asking about ADS...

    CSS Howto..

    CSS How to get rid of border that appears around custom button on and after click

    How to programmatically ungroup CSS selectors?

    How to create a button with a CSS-animated background?

    How to give equal width for all the fields in the form with validations?

    How to set auto-margin boxes in flexible-width design using CSS?

    How do I get a link to ignore hover on mouseover?

    How to make diagonal div

    How to include a custom CSS file in TYPO3

    How to make last element of second level of menu to drop up?

    how you can change the style of the page without changing CSS files?

    How to make this series of rules into a mixin?

    How can I change the paragraph formatting in the SharePoint RichHtmlField

    How to add a custom font to Rails app?

    How to make a floating page div responsive

    How do I replace color: windowtext;

    How to underline gaps created with CSS columns property?

    How to centre a javascript element using inline css? [closed]

    How to get rid of !important tags?

    How to convert this CSS animation to use GPU level, instead of updating layer tree

    Why the space after the table, and how to remove it?

    Keep mobile browser from showing elements outside body?

    div under div - dont know how to do this

    How to remove inherited styles using jQuery?

    How do I output HTML form data to PDF?

    How to create class in a custom CSS file by JavaScript?

    How to do formatting using CSS to table

    How can I create an overlay that stays in DOM as opacity 0 but doesn't prevent content from being clickable?

    How do you create a transparent overlay with text upon mouse hover?

    How to Decrease Image Brightness in CSS

    HTML/CSS Fluid Grid: How to overlay div to another div