Recent Topics

[1.10.x] Setting minimum height on preview pages

Started by on Feb 29, 2008 – Contents updated: Feb 29, 2008

Feb 29, 2008 23:04    

My b2evolution Version: 1.10.x

Hi all, I've been using b2 for a few months now and this is the first stumper that I've hit.

I had no problems setting a minimum height for my news blog at [url=http://tmesismag.com/news/]tmesismag.com/news[/url] - I needed to do that so the sidebar wouldn't be spilling off the bottom of the blog border. Now, I need to also set the minimum height for blog post preview pages and archived pages that don't have entries in them. (This problem only persists in Firefox.)

[url=http://tmesismag.com/news/index.php?blog=1&m=200805]Here's an example archive page with the problem[/url].

What I'm trying to figure out is whether or not these pages used a different source and/or stylesheet than the _main.php I have in my custom skin folder, and if so, where I can find it.

I have to admit, I've only been working with CSS for a few months, so it's still a little confusing for me to see what source file is pointing to which stylesheet in b2. Any help would be much appreciated :)

(Sorry if this topic's already been done - did a search and couldn't find anything.)

Here are links to the source/style files of my main blog page if it would be of any help: [url=http://tmesismag.com/news/skins/tmesis/_main.php]_main.php[/url]/[url=http://tmesismag.com/styleblack.css]styleblack.css[/url]. Sorry if it's messy - like I said, I'm pretty new at this :p

-Ray

Mar 14, 2008 07:27

*bump!*

Hmm, I seem to have fixed the problem, but I'm still not sure why certain elements of post preview pages and archive pages are different from those on the main blog ([url=http://tmesismag.com/news/]tmesismag.com/news[/url]).

The link I have at the bottom of [url=http://tmesismag.com/news/index.php?blog=1&m=200806]that example archive page[/url] is blue while on the main blog page, it's white.

So, the question still stands: can anyone tell me where I can edit these properties for the post preview and archive pages? My deadline's coming soon and this is my last ditch effort to understand what's going on here before I switch back to other blog software I'm more familiar with (which would be a shame because I've come to love b2evolution).

-Ray

Mar 14, 2008 07:50

Your page footer , for some reason is much wider than your content div on the BLUE link page.
In your normal page, where the footer link is white, there are five occurrences of "mainblack.css" that are not loading....

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /news/mainblack.css was not found on this server.<P>
<P>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.
<HR>
<ADDRESS>Apache/1.3.39 Server at tmesismag.com Port 80</ADDRESS>
</BODY></HTML>

Mar 14, 2008 07:55

Hi rwong. Assuming your skin isn't doing something unusual, then all pages will use the same style sheets. Looking at the head section of your main page and the archive page, this appears to be the case, but using the Web Developer toolbar and attempting to edit your style sheets tells a VERY different tale.

Back to this in a moment, but first I want to point out that you really should fix your xhtml markup before worrying about your css as the former will easily adversely affect the latter. http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Ftmesismag.com%2Fnews%2F is I'm pretty sure from your main page, and http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Ftmesismag.com%2Fnews%2Findex.php%3Fblog%3D1%26m%3D200806 is from your archive page. Most of the errors are easily cleaned up, so you really should go after those before anything else. ESPECIALLY the errors that come from the mention of pingbacks in your head section!

Where was I? Oh yeah: style sheets. The Web Developer toolbar on your main page tells me there are 5 instances of calling "mainblack.css" that are resulting in a 404 error, but I don't see those pages being called from the archive page. In both pages in the head section I see

<link rel="stylesheet" href="../../../styleblack.css" type="text/css" />
<link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />

and in no case do I find the reference to mainblack.css so that is something else I'd be looking for.

Anyway the simple truth is that the post preview pages and archive pages use the same style sheet(s) as any other page generated by b2evolution - normally. Something very odd is happening with your skin though, and since it's your creation you're the one in the best situation to find and fix the problem. As I said, I'd start by fixing the xhtml markup, then move on to making sure I was using valid style sheets, but I'd also be looking at my _main.php file to make sure that anything "non standard" is opening and closing properly. For example seeing

<!-- Closing hidden DIVs from PHP --></div></div></div></div><!-- Closing hidden DIVs from PHP -->

when I view source makes me think you've got some very non-standard stuff happening in there.

Good luck with it!

Oh and do visit the link in your first post to your _main.php file and tell me what you think someone might do with it ;)

Mar 14, 2008 08:09

Great replies from John and EdB.

Let me add this. You didn't find some pages like the archives. This is what happens. Every _main.php file relies on a few others. Thery are called in a php include statement. It assumes these files are in the same folder as the _main.php *but it will fall back on the default files in the /skins/ folder*. So do check out the files in the /skins/ folder. Normally there is no need to change them, so leave them as is, but if you may want to make some changes, copy them over to your skins folder and edit them.

As EdB pointed out, there are also a few default css files. They are in the /rsc/ folder. No need to edit them, css overrides, meaning that it will aply the last statement it encounters from top to bottom. So if you first say the link should be yellow and later you say the link should be green, the link will be green. Likeso with the default css. It handles some things you may not care about, but if you do, simply change in your own css file. But I should keep those original import statements on top of your css file.

Good luck

Mar 16, 2008 00:12

Wow, just wanted to thank y'all for the support. It's been putting my head in a spin, but things have certainly been clarified a bit here.

I'll report back with my progress.

-Ray


Form is loading...

Free CMS – This forum is powered by b2evolution CMS, a complete engine for your website.