Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to Resize Block Region in Drupal?

Posted on 2012-03-19
1
1,466 Views
Last Modified: 2012-03-29
I'm using the out of the box Bartik theme on my Drupal 7 site.

I have some content I was going to stick into a block, and place it in the Sidebar Second region but the content is being squeezed.

How can I resize the block, or resize Sidebar second region (which ever is best practice)?
0
Comment
Question by:sandshakimi
1 Comment
 
LVL 14

Accepted Solution

by:
Scott Madeira earned 400 total points
ID: 37744171
If you want to make changes directly to the Bartik theme you would change your CSS in /themes/css/layout.css.  This isn't generally considered a good practice as you are messing with core Drupal that will get overwritten in an upgrade.

I would suggest that you copy the bartik theme to /sites/all/themes/mybartik, rename the bartik.info file to mybartik.info in the new location, update the mybartik.info file data (change the name, description, etc.

Make mybartik your active theme, clear caches, etc. and make sure it works.

THEN, change the layout.css file to change column widths.  You probably want to change some combination of these lines to make things fit:

.one-sidebar #content {
  width: 720px;
}
.two-sidebars #content {
  width: 480px;
}
.no-sidebars #content {
  width: 960px;
  float: none;
}
#sidebar-first,
#sidebar-second {
  width: 240px;
}

Open in new window

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question