How can I have a fixed width second sidebar on a fluid layout? For the majority of Fluid websites out there, content is dynamic and sidebars are fixed, but this doesn't seem to be possible with Omega. Am I missing something?

Comments

Cellar Door’s picture

hmmm good question! Though there may be a better way of doing it here's how I'd try it:

1. Enable the fluid grid rather than the one using the default media queries.
2. Say your sidebar is 300px, place it in a region and give it an absolute position. This would remove it from the grid (not resize with it) and you can set the position and width through css.
3. On your content that is next to the grid, keep a 300px margin on the side that has the sidebar and make sure your content is using all the columns in the region (set to 12 columns in a 12 column region). This would allow you to keep that 300px on the side while the content in the grid is resized as the screen moves.

This is just a shot in the dark as I haven't had to do this yet but see if it works for you.

Cheers!

marcoka’s picture

Component: Code » Documentation

great idea, i will test that.

marcoka’s picture

this is not possible.
you would need to set the content to use all avaliable space: here 12 columns, the sidebars you can set to 1
which omega checks if that matches...error:

You have specified the Content region as the primary region for the Content zone but the summed region width is greater than the number of available columns for that zone.

ok so far this is a very bad solution and may involve hacking out the column checking function

marcoka’s picture

Status: Active » Closed (works as designed)

i am closing that. after i spend some hours and tried some stuff my final conclusion is that doing that causes more problems than it solves. if one needs fluid content area and fixed sidebars one should use a theme like Adaptivetheme.

troybthompson’s picture

If anyone figures this out, I'm looking for the same solution. Fixed sidebar and fluid content is how I always have designed, but trying to take advantage of Omega features now.

khiminrm’s picture

Hello! If anyone will be finding how to accomplish this. Here is the solution that halped me:
1. Add to the template.php the snippet from https://drupal.org/node/1365056#comment-5643864
2. In theme settings define weights for regions:
Content = 1
Sidebar first = 2
Sidebar second = 3

3. Add style to the css file in your theme like this:

#region-content{
	width: 100% !important;
}
.two-sidebars  #region-content .region-inner{
	margin-left:310px;/* = width of sidebar first + margins*/
	margin-right:310px;/* = width of sidebar second + margins*/
}
.one-sidebar.sidebar-first #region-content .region-inner{
	margin-left:310px;/*= width of sidebar first + margins*/
}
.one-sidebar.sidebar-second #region-content .region-inner{
	margin-right:310px;/* = width of sidebar second + margins*/
}
#region-sidebar-first,
#region-sidebar-second{
	width: 280px !important;/*width of sidebars*/
	float:left;
}

#region-sidebar-first{
	margin-left: -100% !important;
}
#region-sidebar-second{
	margin-left: - 300px !important;/* = width of sidebar second + it's margins*/
}

Hope this will save some time for someone else.