Basic CSS Question

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Anti-Spam Guide
Locked
coreysnyder04
Registered User
Posts: 11
Joined: Mon Feb 21, 2005 6:02 pm
Location: ohio
Contact:

Basic CSS Question

Post by coreysnyder04 » Wed Feb 17, 2010 9:41 pm

Hey, I have a forum over at: http://www.centralohiohockey.com/forum/

Did you notice that CSS/Formatting jump as it loaded? That's because I modified the subsilver theme. But I didn't modify the right CSS, so in order to get the style to show up, I had to call a JS onload function of

Code: Select all

setActiveStyleSheet("A+"); 
Now if I understand this correctly, its because I modified the wrong CSS file to show my changes, and that A+ is a way I'm telling it to use that CSS that I did modify.

So, my question is, what is the CSS file its hitting originally, before I switch it to something else? I've gone in and added my code to a ton of diff style sheets in order to try and hit the right one but I've been unsuccessful. is it stored in a DB somewhere? Any help would be appreciated.

Thanks,
Corey

efficacious
Registered User
Posts: 355
Joined: Thu Aug 02, 2007 5:25 am
Location: 127.0.0.1

Re: Basic CSS Question

Post by efficacious » Wed Feb 17, 2010 9:45 pm

The styles are kept in the database by default. However you can either refresh the databse with the changes to the hard files via the "Style" tab in the ACP or you can check the "Recompile Stale Style components" option. Which is also located in the ACP. Something I like to do when modding styles is I create my own CSS file and then simply add it to the bottom of the css file list. The JS is simply overkill and is not needed.
GET YOUR OWN CUSTOM STYLE PM ME

Recent works:
http://www.phpbb.com/community/viewtopi ... 4&t=633545

coreysnyder04
Registered User
Posts: 11
Joined: Mon Feb 21, 2005 6:02 pm
Location: ohio
Contact:

Re: Basic CSS Question

Post by coreysnyder04 » Wed Feb 17, 2010 10:37 pm

efficacious wrote:The styles are kept in the database by default. However you can either refresh the databse with the changes to the hard files via the "Style" tab in the ACP or you can check the "Recompile Stale Style components" option. Which is also located in the ACP. Something I like to do when modding styles is I create my own CSS file and then simply add it to the bottom of the css file list. The JS is simply overkill and is not needed.
I did refresh on the themes, templates, and image sets but you still see a jump when the page loads. Its clear that its still using one CSS file for a split second before the JS tells it to use the right one. Do you know what css file it is using by default? There are so many css files in the theme, I'd rather not add my code to the bottom of every single one. I tried adding my style sheet directly, at the bottom of the css file list, but it still gets overridden by something else on page load.

efficacious
Registered User
Posts: 355
Joined: Thu Aug 02, 2007 5:25 am
Location: 127.0.0.1

Re: Basic CSS Question

Post by efficacious » Wed Feb 17, 2010 10:41 pm

It uses all of the css files...

each CSS file handles a specific aspect of the site style.

The most common changes are made in both the "Colours.css" and "Common.css" files.
GET YOUR OWN CUSTOM STYLE PM ME

Recent works:
http://www.phpbb.com/community/viewtopi ... 4&t=633545

coreysnyder04
Registered User
Posts: 11
Joined: Mon Feb 21, 2005 6:02 pm
Location: ohio
Contact:

Re: Basic CSS Question

Post by coreysnyder04 » Wed Feb 17, 2010 11:04 pm

Well kind of. Doesn't it use
small.css
medium.css
large.css
depending on whichever size you have selected. There is a little size selection on the phpbb forum which allows you to chose a font size. I noticed when I clicked it a couple times, BAM, my CSS would display properly. Click it again, and it would go back to the old styles. So it was clear that I had edited some of them correctly, but whichever it uses as default, be it "default.css", I was not touching. Obviously I made up default.css. If I knew which default was I wouldn't have this problem.

efficacious
Registered User
Posts: 355
Joined: Thu Aug 02, 2007 5:25 am
Location: 127.0.0.1

Re: Basic CSS Question

Post by efficacious » Thu Feb 18, 2010 12:45 am

yes but that is only for font size..

There are several css files..

common.css
colours.css
bidi.css
ect...

each one handles a different aspect of the style.

Colours.css for instance would handle the colors...
common.css handles the most common elements...
ect..

I'm sory I didn't notice you said SUBsilver.. I believe the style "Subsilver" only actually uses 1 css file.
In which case it makes things even easier.. everything is inside the one css file.

Subsilver is reminiscent of the older version of phpbb.. version PhpBB2.. the style was carried over into PhpBB3 aswell but utilizes a slighty different organization schema.

The css file in question should be located is a directory similar to the following:

phpBB3/styles/subsilver/theme/subsilver.css
GET YOUR OWN CUSTOM STYLE PM ME

Recent works:
http://www.phpbb.com/community/viewtopi ... 4&t=633545

User avatar
Lumpy Burgertushie
Registered User
Posts: 66897
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Basic CSS Question

Post by Lumpy Burgertushie » Thu Feb 18, 2010 3:24 am

efficacious wrote:The styles are kept in the database by default. However you can either refresh the databse with the changes to the hard files via the "Style" tab in the ACP or you can check the "Recompile Stale Style components" option. Which is also located in the ACP. Something I like to do when modding styles is I create my own CSS file and then simply add it to the bottom of the css file list. The JS is simply overkill and is not needed.
what are you talking about?

the styles are kept in the stylesheets, the css files that are in the theme folder.

yes, they do get put in the database when you edit them from the admin panel but that goes away each time you refresh the style/template/theme/imageset or purge the cache.

that is why, it is always suggested to download the actual files, edit them and upload them back.

then refresh whatever it was to get rid of what might be in the database and the cache so that you can see the changes.

yes, you can set the "recompile stale style componets" to yes so that you do not have to go through the refresh mess, but it doesn't work if you are going to edit from the admin panel anyway. that is not why you would change the style componets setting in the first place.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Locked

Return to “[3.0.x] Styles Support & Discussion”