You are here: Home » Tutorials » Tips-Tricks » Resizing the Left and Right Containers

Resizing the Left and Right Containers

Posted by Stan Bogdanov on 08 January 2008 - 19:31

Very often we need more space for, say, a reading text and less space for the questions, or vice versa.
See a demo (resize to 600x800 and back to see what happens). Here's a small trick how to achieve this.

Starting out

Create your exercise as usual and open the .htm file in a Text or HTML Editor. Find this code div.LeftContainer{
...
width: 49.8%;
...
and div.RightContainer{
...
width: 49.8%;
...

Edit some CSS

Depending on which container you'd like bigger, change the width values accordingly, for instance, to look like this:
div.LeftContainer{
...
width: 33.2%; /* adjusted width of the left container -smaller*/
...
and
div.RightContainer{
...
width: 65.8%; /* adjusted width of the right container -bigger */
...

That's it. Save the file and view the result.



Rate this:

  • Currently3.14127423823/5 Stars
  • 1
  • 2
  • 3
  • 4
  • 5
Votes: 722

Share it:

              Windows Live

Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.
Security Code:
 

Feedback Form
Feedback Analytics