Layout problems

Events happening in the community are now at Drupal community events on www.drupal.org.
drdave17's picture

I am trying to line up three boxes horizontally and evenly spaced. First and Second Sidebar and Content in the middle.

How do I keep my content from touching the left side of the box? I tried some classes in the Additional Region Classes with padding but the last box keeps breaking to the next line.

I am using a 12 column layout each box using 4 columns.

btw they are all placed in the content zone.

Thanks

Comments

margins

Anonymous's picture

I've been using lots of margins in the content regions for spacing inside the boxes. For spacing outside the boxes I have added margins for the zones.

For example:

region-content a {

margin-left: 1em;
}

I am not css expert. Can you

drdave17's picture

I am not css expert. Can you breakdown the placement?

Is "region-content a" a class or what I actually place in the global.css? And/or how do I add margins to the content region inside and outside the boxes.I am barely coming to grips with this.

btw there was a strayed curly brace that was causing the box to drop out so I got that fixed.

Thanks much

Ok problem solved. I added

drdave17's picture

Ok problem solved. I added the classes in the content section then the
.region-content-inner {
margin-left: 1em;
}

in global.css

Just a matter of fine adjustments now.

Thanks so much

Hi drdave17, never add

samwillc's picture

Hi drdave17, never add paddings or margins to the #zone itself or a region or the layout will break. As you have done, do it on the region-inner. I've always found it best to use padding to squash things in from the outer edge inwards.

Sam.

Hi SamCan you tell me where

drdave17's picture

Hi Sam

Can you tell me where is this region inner? Is this an actual label? Not following you on this.

My classes .region-content-inner are currently in
content section/preface zone/regions/preface/ sections (1,2,3).

Hi, For example, a zone

samwillc's picture

Hi,

For example, a zone called 'header' with region called 'header-first' inside, set via the Omega theme settings.

<div id="zone-header" class="zone zone-header clearfix container-24">
    <div class="grid-24 region region-header-first" id="region-header-first">
  <div class="region-inner region-header-first-inner">

The 'inner' class is added automatically to all your regions and depends on what your regions are called. So this way you can add padding to any region, just add it to '.REGION-NAME-inner' rather than on '.REGION-NAME'.

Hope this helps.

Sam.

Following your example to

drdave17's picture

Following your example to learn how it's done, in the header section I found header zone/regions/header first (nothing that says inside).
--region called 'header-first' inside,--

And you say set via the Omega Theme settings. I am in appearance theme settings section and do not see a section for entering your div example.

There is also no region name inner anywhere.
--just add it to '.REGION-NAME-inner'--

Unless you want me to go into sites/all/themes folder somewhere and edit one of the files there.

I am still fairly new to Omega Theme sorry.

Hi drdave17, I'll try to

mchris82's picture

Hi drdave17,

I'll try to elaborate a little more on what Sam was getting at. If you look at the following code that is taken from the menu zone, there is a #region-menu id followed by the .region-menu-inner class.

<div id="zone-menu" class="zone zone-menu clearfix container-12">
<div id="region-menu" class="grid-12 region region-menu">
<div class="region-inner region-menu-inner">

This is the typical way regions are wrapped in Omega allowing you to add padding or margins without breaking your layout as Sam mentioned. If you applied the margins or padding to the left or right on the zone itself, your regions wouldn't fit the grid properly.

You can also specify additional zone and wrapper classes in the Omega theme settings under "Zone and region configuration."

Hope this helps.

@drdave17,Can I just add

samwillc's picture

@drdave17,

Can I just add there are no regions called 'REGION-NAME-inner'. These are automatically added to your html source depending on what your regions are called.

You don't have to do anything. Put your region in a zone where you want it, then check your source code (on your published page) and you will see that extra classes have been added.

Post a link to the site you are having problems with if you want, then we could maybe explain a bit better. I haven't got time at the mo to provide an screenshots.

I think I'll write a few blog posts about various things in the Omega theme as it can be quite confusing at first. Once you get it though, it's superb.

Sam.

Maybe I need to just start over...

drdave17's picture

Thanks Sam and the rest of you. I appreciate it.

I think I am digging in too deep and maybe just too quickly. I may have a more serious problem than just trying to get the regions right.

So many questions it is really so confusing. I changed the weight order of post script zone but then again that affects the entire site globally. I did this since I needed four blocks on the top of a certain page. I would imagine that is bad for SEO though.

Then I still have not yet figured out how to create a second page where zone/content, etc is not affected by the previous page I already setup. I am sure that the answer is in the manual somewhere.

I've already done an awful lot of reading on Omega but I am still confused in many areas.

Right now I am mainly interested in constructing a very basic layout of my pages with added css functions, different dimensions and colors, etc for the different regions and so on. I know what I visualize in my head but I can't seem to get it actually going.

Currently, I am still only using global.css but I am sure that this can't be the only solution since there are other css levels.

Didn't mean to get off on another subject altogether folks but I don't see a need for continuing with my site unless I can develop a strong base.

So I guess my question now is, where would be a good place to start reading to learn the above stuff? Even if I have to start over the website,

Thanks again
Dave

Starting over with Omega is ok :)

drew reece's picture

Sometimes you do need to start over, Omega takes a while to get a firm grasp.
Make sure you check out the various Omega tutorial videos, the older ones are obviously out of date but the may spark of enough understanding. The Omega handbook is worth re-reading.

It sound's like you may be wanting to create 'theme variations' for certain pages, Delta & Context module are one way to achieve this. Basically Delta creates a clone of the theme settings (like another subtheme) which you tweak & use context to apply that to the pages requiring the new layout.
The Omega handbook also has a section on using Delta.

The Omega tools module also adds features to export & revert your theme settings, so make sure that is installed.

You may find that you can tweak the content region & avoid possible SEO fubar's.

I agree with Drew. Delta +

mchris82's picture

I agree with Drew. Delta + Context will do exactly what you want in regard to different layouts for different pages.

http://drupal.org/project/delta

If you haven't installed the Delta module, do so and read up on the specifics of how to use it with the Context module.

Good luck and let us know how it goes!

I have Delta installed from

drdave17's picture

I have Delta installed from the jump. Maybe I can save all my block html stuff and delete all the pages, content types, global.css (whatever else I messed up) then play around with Delta/Context and see how far I get without a re install?

Sure, you could do that. I

mchris82's picture

Sure, you could do that. I haven't used the core block management since I discovered Context and how powerful it truly can be.

As far as deleting your global.css, you could just rename it to something like global.css.old or something similar and just add a new, blank global.css to work with. I guess it depends on how much you've already done with your subtheme.

Another option would be to just create a fresh subtheme of Omega and work with that. I don't know if deleting your content types, etc is necessary since we've been discussing layout for the most part.

aod

Switch back to Bartik & see

drew reece's picture

Switch back to Bartik & see how messed up the content & menu's are. The Omega tools generates a new subtheme really quickly, use a new name and flush the caches to make sure it gets picked up.

Keeping all this good info in

drdave17's picture

Keeping all this good info in mind I think I am going to start over from scratch. Reason is, I ended up with a problem using the Gallery Formatter. The arrows broke and no matter what I do I can't get them back even after adding them back in Style dropdown. I think Colorbox might have been the culprit because after installing it is when I noticed them gone.

Then there is now an error on the home page that just won't go away. After deleting the content type for the slideshow is when the error showed up.

Notice: Undefined index: slideshow in _exclude_node_title() (line 191 etc.

Unless I can fix those I might just start over.

Can't remember from where but I had uploaded a starter global.css that contained all the colored in zones and regions and I got pretty doggone far. I'll keep it as a reference.

II'll keep all your advise in mind. It's a learning process and you guys have been great.

Thanks so much for all the help

Omega videos

HupaGOMan's picture

"Make sure you check out the various Omega tutorial videos"

Anyone know where these videos can be found?

Thks.

Omega Framework

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week