Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
div koschtitgallery
11-12-2009, 10:38 PM (This post was last modified: 11-12-2009 11:03 PM by tobsp.)
Post: #1
div koschtitgallery
hallo zusammen,

erstmal großes lob für die gecodete galerie.

ich habe das script jetzt eingebunden, hat soweit auch alles funktioniert.
nun möchte ich, dass meine vorschaubildchen, mittig von meiner seite plaziert sind, wo kann ich dieses einstellen? ich habe nämlich nichts gefunden.

außerdem sagt mir der validator wenn ich den testen lasse 9 errors (alle von der gleichen sorte:

Line 235, Column 156: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag

…; height:300px; background:#666666;'><noscript><div style='padding:4px;'>Plea

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

über hilfe und tipps würde ich mich sehr freuen

mfg tobsp
Find all posts by this user
Quote this message in a reply
11-16-2009, 05:47 PM
Post: #2
RE: div koschtitgallery
(11-12-2009 10:38 PM)tobsp Wrote:  hallo zusammen,

erstmal großes lob für die gecodete galerie.

ich habe das script jetzt eingebunden, hat soweit auch alles funktioniert.
nun möchte ich, dass meine vorschaubildchen, mittig von meiner seite plaziert sind, wo kann ich dieses einstellen? ich habe nämlich nichts gefunden.

außerdem sagt mir der validator wenn ich den testen lasse 9 errors (alle von der gleichen sorte:

Line 235, Column 156: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag

…; height:300px; background:#666666;'><noscript><div style='padding:4px;'>Plea

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

über hilfe und tipps würde ich mich sehr freuen

mfg tobsp

Um ein Blockelement mit fester Breite ( wie z.B. das koschtitgallery-div ) mittig auszurichten genügt einfach margin auf auto zu setzen. Etwas so:

PHP Code:
<div style="koschtitgallery" title="..." style="margin:auto;"></div

Das hat auch nix mit der Galerie zu tun, sondern ist einfach nur normales CSS.
Dein zweites Problem mit dem Validator erklärt sich auch von selbst. Du darfst einfach keine Blockelemente in Inline-Elemente einfügen. Ein "<div>" ist z.B. ein Blockelemente ( es hat sowohl eine feste Breite als auch Höhe ). "<noscript>" dagegen ist ein Inline-Element, was keinen festen Bereich einnimmt, sondern einfach nur im Textfluss steht.
Wozu machst du den "koschtitgallery"-Div denn überhaupt in ein <noscript>-Tag? Das Galerieskript kümmert sich von alleine um das Anzeigen eines entsprechenden Hinweises bei deaktiviertem JavaSript.

KoschtIT Image Gallery developer
Visit this user's website Find all posts by this user
Quote this message in a reply
11-16-2009, 06:27 PM
Post: #3
RE: div koschtitgallery
hallo,

Code:
<div style="koschtitgallery" title="..." style="margin:auto;"></div>

funktioniert wunderbar. ich dachte nur evtl gibts eine funktion bei welcher ich links, mittig oder rechts auswählen kann.

das "<noscript>" habe ich nicht eingefügt, dass wird so von deinem script ausgegeben.

mfg tobsp
Find all posts by this user
Quote this message in a reply
11-16-2009, 08:55 PM
Post: #4
RE: div koschtitgallery
(11-16-2009 06:27 PM)tobsp Wrote:  das "<noscript>" habe ich nicht eingefügt, dass wird so von deinem script ausgegeben.

Dann gib mal nen Link zu deiner Seite oder poste mal den Quellcode, damit ich selbst mal sehen kann, wo genau das Problem ist.

KoschtIT Image Gallery developer
Visit this user's website Find all posts by this user
Quote this message in a reply
11-16-2009, 11:02 PM
Post: #5
RE: div koschtitgallery
das ist der link zur bildergalerie: http://tspies.de/bildergalerie.php
Find all posts by this user
Quote this message in a reply
11-16-2009, 11:55 PM
Post: #6
RE: div koschtitgallery
(11-16-2009 11:02 PM)tobsp Wrote:  das ist der link zur bildergalerie: http://tspies.de/bildergalerie.php

Du platzierst den "koschtitgallery"-div in einem p-Tag. Das ist genau das was ich meine. Ein p ist ein Absatz und kann nur inline-Elemente beinhalten. Es gibt überhaupt keinen Grund die divs in ein p einzuschließen. Nimm diese weg und schon ist alles valide.

KoschtIT Image Gallery developer
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)