Closed (fixed)
Project:
Zen
Version:
6.x-1.0
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2008 at 07:18 UTC
Updated:
16 Dec 2010 at 21:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
silurius commentedI have the exact same question (subscribing). After struggling I finally decided to resort to a jquery approach for the time being while I work on other things. Edited to add: My struggles were with a 5.x subtheme. Have not looked into this for 6.x subthemes yet.
Comment #2
johnalbin@silurius: Since the HTML and CSS are nearly identical for Zen 5.x and 6.x, the same styling techniques will work for both.
I use the classic faux columns method to do rounded corners: http://www.alistapart.com/articles/fauxcolumns/
Note that Zen has several wrapper divs, so if you were trying to put rounded corners on the content div, you have these divs to play with:
You can also use adjoining divs to add bg images:
I often find those divs sufficient to do rounded corners, especially with fixed width layouts. For example, #main-inner gets a bg image with the top of the rounded corner boxes for content and sidebar columns, #main gets the repeating middle, and #footer gets a fat top padding and a bg image with the bottom of the rounded corner boxes.
This does take some mental gymnastics to figure out how to do it without adding wrapper divs, but its possible.
And, if you can't figure out a way, you can always copy the page.tpl.php from the main zen theme into your sub-theme and add an extra wrapper div. I've had designs that required adding them. :-)
Comment #3
ff1 commentedThanks for your reply. I can see how that solution works for fixed width themes. But I forgot to mention that I am working on a fluid width theme, so both sidebars and content need to be able to adjust width and height.
I have had success by adding an extra div to the block.tpl.php file like this:
and using the following css:
See the attached file for the results.
I was just wondering whether the same results could be achieved without adding the additional
Thanks again.
Ian
Comment #4
ff1 commentedComment #5
johnalbinLiquid layouts require a lot more wrapper divs. If you don't want to add wrapper divs, javascript is the only possibility.
Leaving this as "active" so someone else can chime in with a js solution; I haven't ever used one.
Comment #6
SpriteGF commentedI installed NiftyCube (not the Drupal module, but directly from http://www.html.it/articoli/niftycube/index.html ), which creates rounded corners on your div elements. My code ended up looking something like this:
I will second the need to add additional div elements to the Zen theme so that designers can create liquid layouts, or at least incorporate some help/documentation in the Zen theme since so many people have been conditioned with A List Apart's Sliding Doors technique.
Comment #7
s.daniel commentedIf you don't mind a little js here is a jQuery plugin
http://www.methvin.com/jquery/jq-corner-demo.html
And here is a drupal module for that:
http://drupal.org/project/jq_eyecandy
Comment #8
ff1 commentedThanks everyone for the tips.
I think it would be a good idea to turn this into a documentation page. Should it go under 'zen theme' or 'theme code snippets'?
Comment #9
attiks commentedjust to let you know that i've successfully used http://drupal.org/project/rounded_corners together with the zen theme, but there's no 6 port (yet)
Comment #10
JuLearn commented@attiks
Your short words sound pleasing and promising.
I am working on the same path, but I do not get working "Rounded Corners" on the sidebars :-(
Could you explain your proceedings a little bit in some more words? What code did you enter for your successful results?
And - are you already working with v.1.92? On the following page, there are very interesting improvemnts shown:
http://malsup.com/jquery/corner/
Especially the "adornments"-part with frames around a block sound very interesting!
Comment #11
attiks commented@JuLearn
I'm using Rounded corners 5.x-1.x-dev (2007-Jun-19) together with version 1.7 (1/26/2007) of jquery.corner.js, to add the corners i just added the following to /admin/settings/rounded_corners
First two lines for the main content, the last line for a block in a sidebar
What problem do you have?
Comment #12
JuLearn commented@attiks
Thank you so much for answering that quickly!
Now I found out that I don't have a Rounded Corners-problem but a Drupal/CSS-Knowledge-Problem.
First I had to learn to declare a special Drupal-block in CSS which is nicely described here:
http://drupal.org/node/74481
With these informations it's easy to attribute blocks. Great!
My actual problem may be another CSS one. I hope I don't bother anybody...
On this page there are described a lot more varations with RC:
http://malsup.com/jquery/corner/
Very interesting to me: "Adornment". In the description they talk about "Effects Using Nested Cornered Elements (Thanks to Kevin Scholl for this idea)"
Code for the example "Round" like
$(this).corner("round 8px").parent().css('padding', '4px').corner("round 10px")...what the hell are Nested Elements e.g. how do I handle them in Drupal?
Comment #13
silurius commented(Resurrecting thread & changing to 6.x-1.0)
In my fixed layout subtheme, I struggled a bit trying to apply a pure CSS technique with a border variation to node-inner. Part of bottom region would lose the a portion of the right- and left-hand borders (but not the corners) and would lose part of the background color. Tweaking the margins and padding only seemed to make this worse. I finally caved and went with a jQuery method (jquery.corner.js by malsup).
So far the most basic approach works great when applied to the node-inner class in all browsers. But when I attempt to apply a border using two different techniques, it fails in IE.
Technique #1
jQ:
$(".node-inner").corner("keep round 10px");CSS:
Outcome: IE applies a square corner around the rounded background. FF & Safari are fine.
Technique #2
jQ:
$(".node-inner").corner("round 8px").parent().css('padding', '4px').corner("round 10px");CSS: (Same as above)
Outcome: IE does not display the border. FF & Safari are still fine.
I'm certain I have seen an IE CSS trick for this, but I have lost track of it.
Help?
Comment #14
vacilando commentedSubscribing.
Comment #15
izmeez commentedsubscribe
Comment #16
silurius commentedThread bump reminded me that I found a pretty good compromise for sidebar content, which I saw in use on roundedcorner.com.
Block rounded corner HTML:
Paste this into a block edit form, and replace
[MY CONTENT]with the content you want in the block.Block rounded corner CSS:
This solution is crude, but it works pretty well so far. I plan to move the html into one of the template files instead, and then adopt the same solution for the main content area. If anyone else manages to do that, please report back!
Even though I prefer CSS over jQuery for this, I would love to hear input on the jQuery IE issue I mentioned above.
Comment #17
akalata commentedClosing old and inactive support requests.