On 2014-03-07, 1:13 AM, Alastair Sherringham wrote:
That's probably due to the absolute positioning that Vector's css uses. You'll have to add some extra css of your own to tweak the top position of stuff, or add a relative positioned wrapper around vector's normal content to contain the absolute position within a box you can push down.
Yes, I think I need to look at some CSS and re-position.
A quick question - Bill's way of adding a header/banner is just to write some HTML directly after the very minimal PHP code as per your tutorial (i.e. after "class SkinZedDocs extends SkinVector {", terminated). This is a much smaller and simpler file obviously that copying all the template code from Vector.php. If one only wants to add a banner/header to the output, is there any reason to do it the "long" way over the short and sweet way?
Now that I think I actually understand what you're asking I'll answer your question.
If I understand it right now, Bill is suggesting that you use:
<?php // ... class SkinFubar extends SkinVector { // ... } ?> <header> My html header code. </header> ...
This idea is over 9000% wrong. You're not actually adding anything to the skin at all. The html is simply being echoed whenever the php file is loaded, which is typically the first time SkinFubar is needed. This happens even if the skin isn't used, just as long as it's autoloaded, and is not present if the skin is used to render multiple pages (like DumpHTML).
In one circumstance this can lead to the "headers have already been sent" fatal error as it's possible that the echoed html is output before we define our HTTP headers. Otherwise, ie: if ob_start() happened to be called and collected that text, what happens is this supposed header is really garbage (the technical jargon type) that gets output before any of the skin's html is output.
Which really means that your "header" looks about like this:
<header> My html header code. </header> ... <!DOCTYPE html> <html ...> ...
This html is completely invalid. The entire page <head> is now part of an implicitly inserted empty <body>, any class defined on <html> or <body> probably won't even target the DOM in your header.
But worse, the DOCTYPE has been completely killed – as it must be the first part of the page – which will trigger quirks mode on your wiki and – depending on how vector is built – may ruin the skin causing visual bugs all over the place that vary from browser to browser, since our skins are not designed for quirks mode.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]