Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- nestormateo responded to »Fillters in Clip« 06:33 AM
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 03:19 AM
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
- mazdev responded to »zikula 1.3.3. and IE9« 19. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Fixed size vs 100%
-
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
If by "global background" you mean fixed background for all pages, filling the browser window, look at the stylesheet. You'd make it a property of the BODY tag:
Code
BODY {
background: none;
background: url("../images/bground.jpg") fixed;
}
the URL path between brackets is relative to the stylesheet, so above first it moves out of the "style" directory (../), then switches to the "images" directory.
"fixed" means it doesn't scroll when you scroll the page down. There're other options.
You can do the sdame for any tag, or classes of a certain tag, eg. TABLE.examples
CSS syntax is another kettle of fish. Lots of reference sites about, a search here should drag up a few good ones, and any decent HTML editor should handle it with ease. However, even the mighty DreamWeaver could do a lot better. There are things you cannot do through its interface.
Oh, don't bother with both stylesheets, one is pretty much legacy. I just use styleNN.css for best compatibility, and remove all rules from the other and leave a note instead:
/* See styleNN.css */
because browsers don't like it being completely empty.
Thor -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
How does this fixed work? I use the background-repeat style thingy, does fixed make it expand the whole window of the page?
REgards
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
Maybe I should have put
Code
BODY {
background: url("../images/bground.jpg") 0 0 no-repeat fixed;
}
or
BODY {
background: url("../images/bground.jpg") center center no-repeat fixed;
}
or
BODY {
background-image: url("../images/bground.jpg");
background-attachment: fixed;
background-repeat: no-repeat;
background-position: center center;
}
In this case, where you have one large background image, 0 0 is the upper left corner and the default (just as "center center" is horizontal and vertical centering)
W3C Background-attachment or here
As mentioned, it just fixes the image in relation to the browser window so it doesn't scroll with the rest of the page ("scroll" is the default, and only other value). Example; the 1st W3C link above use it for their logo. At least that's how it works in standards browsers like Mozilla FireFox or Opera. Works on the BODY in IE, but not it seems on other elements, like DIVs, as it should.
An example is the Drumschool theme I converted from this thread:
screenshot
The background image stays static and doesn't scroll out of view when you scroll down the page. On anything other than IE, the same rule applied to the Block container DIV and Article container, but with slightly different images, produces the effect of translucency, like the panes were stained glass. Apply a Glass Ripple filter to these images, or some other effect like gaussian or motion blur, and you have some cool transparency effects, all done with background-attachment: fixed;
But as mentioned, IE fails on the container elements, as well as failing positioning relative to the browser window (2 strikes against their claim of CSS1 compliance), so in this example I applied the IE Alpha filter to similar effect. This is possible by exploiting an IE CSS bug, which all other browsers ignore.
Unfortunately there isn't a way to resize a background image, or auto-resize to fill an area. -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Thanks for the great description, I will have to try this out soon :)
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
**unknown user**
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 107
First (and main) thing that I look for in a theme is that it works with my resolution; as a person using 1400x1050 on a laptop there isn't many that look good but fit... As I'm on a laptop, dropping my resolution makes my screen resize itself so there isn't much option in that. I just wish that more deveoplers would go the extra mile for people in my boat... Theres nothing that I hate more than to go to a webpage that'd designed for fixed width only as all I end up seeing is white overflow on the sides of their design... -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
gizmo
First (and main) thing that I look for in a theme is that it works with my resolution; as a person using 1400x1050 on a laptop there isn't many that look good but fit... As I'm on a laptop, dropping my resolution makes my screen resize itself so there isn't much option in that. I just wish that more deveoplers would go the extra mile for people in my boat... Theres nothing that I hate more than to go to a webpage that'd designed for fixed width only as all I end up seeing is white overflow on the sides of their design...
I have been thinking about this a lot lately and I would like my themes to cater for this, but the problem is that I do not have access to this resolution - I just can't test properly...
Maybe I will have to shell out ona desktop with a big monitor one day...
REgards
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
No Worries, thanks a lot, Gizmo I will keep this in mind when I create my next theme; thats if I manage to survive all the pending lawsuits... LOL
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 8
The only problem with the theme that i am currently using is that lots of people hate have to scroll over to see whats on the right side of my site. I know thats really petty, but I would like to know what part of the file do I need to modify to make some people happy including me. Thanx -
- Rank: Softmore
- Registered: Dec 16, 2003
- Last visit: Jan 19, 2010
- Posts: 100
msandersen
I'm not a real themer, I just sometimes like to mess with PostNuke and clean up/update old themes for fun.
Much to the contrary, msandersen seems to be one of the few real themers out there. -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
GlueBeard
msandersen
I'm not a real themer, I just sometimes like to mess with PostNuke and clean up/update old themes for fun.
Much to the contrary, msandersen seems to be one of the few real themers out there.
yes I agree :)
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
