Author | Message |
---|---|
|
Tuesday 08 February 2005 11:06:15 am
When I try to align objects/images in an article it only works in the admin preview. http://www.ez.no/community/forum/general/unable_to_align_objects_in_3_4 I have compared the admin .css with my mysite .css, but I was unable to find any obvious differences. I even tried to delete all my custom style sheets, but with no luck.
I also get this error message: |
Tuesday 08 February 2005 11:44:46 am
Hi, Could you put some xhtml and CSS code from output? Personal website -> http://serwatka.net |
|
Tuesday 08 February 2005 1:02:48 pm
Do you mean the whole style sheet and template? |
|
Tuesday 08 February 2005 2:09:56 pm
Only xhtml output your article with image and part of CSS which is responsible for image align. Personal website -> http://serwatka.net |
|
Tuesday 08 February 2005 3:05:11 pm
article_full template <div id="article"> <form method="post" action={"content/action"|ezurl}> <input type="hidden" name="ContentNodeID" value="{$node.node_id}" /> <input type="hidden" name="ContentObjectID" value="{$node.object.id}" /> <input type="hidden" name="ViewMode" value="full" /> {default content_object=$node.object content_version=$node.contentobject_version_object} <h1>{$node.name|wash}</h1> <div class="byline"> <p> ({$content_object.published|l10n( datetime )} by {attribute_view_gui attribute=$content_version.data_map.author}) </p> </div> {section show=$node.object.data_map.image.content} <div class="attribute-image"> {attribute_view_gui attribute=$node.object.data_map.image align=right} </div> {/section} {section show=$node.object.data_map.bilde_486.content} <div class="attribute-image"> {attribute_view_gui alignment=center image_class=large attribute=$node.object.data_map.bilde_486} </div> {/section} <div class="intro"> {attribute_view_gui attribute=$content_version.data_map.intro} </div> <div class="body"> {attribute_view_gui attribute=$content_version.data_map.body} </div> {section show=$node.object.data_map.enable_comments.data_int} <div class="articlecomments"> {let message_list=fetch( content, list, hash( parent_node_id, $node.object.main_node_id, sort_by, array( published, false() ), limit, $page_limit, offset, 0, class_filter_type, include, class_filter_array,array( 'comment' ) ) )} {section show=$message_list} <h2>{"Kommentarer"|i18n("design/news/layout")}</h2> {section name=Comment loop=$message_list} {node_view_gui view=line content_node=$:item} {/section} {/section} <h2>{"Skriv en kommentar"|i18n("design/news/layout")}</h2> <div class="buttonblock"> <form method="post" action={"content/action"|ezurl}> <input type="hidden" name="NodeID" value="{$node.main_node_id}" /> <input type="hidden" name="ClassID" value="13" /> <input class="button" type="submit" name="NewButton" value="Ny kommentar" /> </form> </div> {/let} </div> {/section} {/default} </form> </div>
My Pagelayout-Override.css In design/mydesign/stylesheets/ /* article styles */ #article div.byline p { color: #888888; font-size: x-small; margin: 0px; padding: 0px; } #article div.intro p { font-weight: bold; font-size: 100%; line-height: 1.5em; font-family: "Times New Roman", Georgia, Times; margin: 0px; padding: 0px } #article div.hoved p { font-size: 100%; font-family: "Times New Roman", Georgia, Times } #article div.body p { font-size: 100%; line-height: 1.5em; font-family: "Times New Roman", Georgia, Times } #article div.relatedarticles { border: 1px dashed #aaaaaa; background-color: #eeeeee; padding-left: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-top: 0.5em; margin-top: 1em; margin-bottom: 1em; } #article div.relatedarticles h2 { color: #999999; font: bold 100% "Times New Roman", Georgia, Times; margin: 0px; padding: 0px } #article div.relatedarticles a { border-bottom: 1px dotted #ff6633; text-decoration:none; color: #ff6633; } #article div.tipafriend { font-size: x-small; margin-top: 17px; padding: 0.5em; border: dotted 1px #aaaaaa } #article div.tipafriend a { color: black; font-size: x-small; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; text-decoration: none; border-bottom: none #ff6633 } #article div.articlecomments { padding: 0.5em } #article div.articlecomments h2 { font: bold 100% Georgia,Serif; color: #999; }
core_article.css In design/mydesign/stylesheets/ /* eZ publish 3 core CSS - th[eZ] 20031105 */ /* Do not remove or delete this stylesheet, because some basic */ /* formatting methods in the system depends on it for proper display. */ /* Just modify and/or override styles where necessary, and remove all */ /* comments when they're not needed anymore (minimizes the file size). */ /* MAIN WINDOW SETTINGS */ body { font-family: Arial, Helvetica, sans-serif; background-color: #ffffff } /* GLOBAL SETTING OF FONT SIZES */ /* All font sizes are set in % and most margins and paddings in em's, this is to make them all dynamic. */ h1 { font-size: 160%; } h2 { font-size: 120%; } h3, legend { font-size: 90%; } h4, h5, h6 { font-size: 80% } p, ul, ol, dl, blockquote, address, label, div.block input, div.block select, .normal, table.list, input.button, textarea /* This is the setting of the "regular" font size. */ { font-size: 80% } .small, div.byline p, p.picturetext, .factbox /* Be careful not to make this size unreadable by making it too small, i.e. usually not smaller than 65%. */ { font-size: 65%; } td.bglight .small, td.bgdark .small /* This is a trick to make the smaller size appear correct when using preformatted % sizes in the table lists. */ { font-size: 80%; } ul ul, ol ol, p label, div.block p input, p input, div.block p select, p select, div.block p textarea, p textarea /* This is to get nested lists to keep the correct size. */ { font-size: 100%; } /* HEADINGS */ h1, h2, h3, h4, h5, h6 { padding: 0em; } h1 { padding-top: 0.2em; margin-top: 0; margin-bottom: 0.5em; } h1, h2 { font-weight: normal; } h2, h3, h4, h5, h6 { margin-top: 0.75em; margin-bottom: 0.25em; } h3, h4, h5, h6 { font-weight: bold; } /* REGULAR PARAGRAPHS */ p { margin-top: 0.25em; margin-bottom: 0; padding-bottom: 0.25em; line-height: 1.25em; /* This is aprox. default line height in popular browsers. */ } pre { margin-top: 0.25em; margin-bottom: 0.5em; } /* LINKS */ a /* This is the standard formatting of all links if no other style is used. */ { color: #0000a0; text-decoration: underline; } a:hover { color: #0000c0; text-decoration: underline; cursor: pointer; } a img /* Some browsers may display a border around a linked image without this attribute set to _none_. */ { border: none; } /* Not currently used, but may be activated if needed. a:visited { color: #000000; text-decoration: underline; } */ /* TABLES */ table.list /* Used on all "proper" data lists presented by tables; i.e. not on tables use for general layout. */ { margin-top: 0.25em; margin-bottom: 0.5em; } table.list th, table.list td { padding: 0.1em; } th { font-weight: bold; text-align: left; } td { font-weight: normal; } td.bglight, td.bglightextra /* Light background color used on alternating lines in a table list */ { background-color: #f8f8f8; } td.bgdark, td.bgdarkextra /* Dark background color used on alternating lines in a table list */ { background-color: #f0f0f0; } td.tight /* Special style used for forcing a tabel cell to wrap tight around an image in an layout table. */ { font-size: 0.1em; } /* ORDERED AND UNORDERED LISTS */ ul, ol { padding: 0em; margin-top: 0em; margin-bottom: 0em; } ul, ul ul { list-style-type: disc; } ul { margin-left: 18px; } li { padding: 0em; margin-bottom: 0.3em; line-height: 1.25em; /* The combination of margin-bottom and line-height makes Internet Explorer and Opera set the same visual distance. */ } /* DEFINITION LISTS */ dl { padding: 0em; margin-top: 0.25em; margin-bottom: 0.25em; } dt, dd { font-style: italic; margin-top: 0em; margin-bottom: 0.25em; } dt { font-weight: bold; } dd { margin-left: 1em; margin-right: 1em; } /* FORMS */ form { padding: 0em; margin: 0em; } input.box, textarea.box { width: 468px; } input.halfbox, textarea.halfbox { width: 230; } input.quarterbox, textarea.quarterbox { width: 110; } input.shortbox { width: 4em; } fieldset { margin-top: 0.5em; margin-bottom: 0.5em; border: 1px solid #000000; } legend { font-weight: bold; } label { font-weight: bold; padding-right: 0.5em; white-space: nowrap; display: block; } div.labelbreak /* Used on an empty tag set after the label tag, to make it possible to change the label positioning in a instant. */ /* Standard display is _block_, but if set to _inline_ the labels will appear to the left of the input fields. */ { display: block; } input.button { font-weight: normal; margin-right: 1em; } input.defaultbutton { font-weight: bold; margin-right: 1em; } div.right input.button, div right input.defaultbutton { margin-right: 0em; } optgroup /* Newer browsers usually supports this tag; may come in handy to visually divide a select dropdown into several parts. */ { font-weight: bold; font-style: normal; } /* PAGE DIVIDERS */ div.left /* To be used with the div.right class, to align a left hand element to the left edge. */ { float: left; display: block; width: 50%; clear: right; white-space: nowrap; } div.right /* To be used with the div.left class, to align a right hand element to the right edge. */ /* Should be followed by the div.break class for proper float/break termination */ { float: left; text-align: right; display: block; width: 50%; clear: right; } div.block { display: block; clear: none; padding: 0em; margin-top: 0.25em; margin-bottom: 0.25em; } div.step { display: block; clear: both; margin: 0; padding-top: 0.25em; padding-bottom: 0.25em; background-color: #f0f0f0; border-bottom: dashed 2px #808080; } div.buttonblock { clear: none; margin: 0em; padding-top: 0.25em; padding-bottom: 0.5em; } div.step div.buttonblock { margin-bottom: 0em; padding-bottom: 0.75em; } div.element /* Used to position several elements next to each other horizontally. NOT on regular buttons. */ { float: left; display: block; padding-right: 1em; padding-left: 0em; clear: right; } div.break /* Used on an empty tag set after one or more div.element has been used, to ensure proper floating and breaking of the elements. */ { display: block; clear: both; } /* ARTICLE FORMATTING */ div.byline { /* No special formatting yet. To be filled in when needed. */ } div.bodyblock { padding-top: 0.25em; padding-bottom: 0.25em; } div.bodyblock p.body { display: inline; } div.imageleft, div.imageright, div.faxtboxleft, div.faxtboxright, div.leftobject, div.rightobject { margin-top: 0.3em; margin-bottom: 0.1em; display: inline; clear: none; } div.imagecenter, div.factboxcenter, div.centerobject { width: 100%; margin-top: 0.3em; margin-bottom: 0.1em; display: block; } div.imagecenter { text-align: center; } div.factboxcenter { text-align: left; } div.imageleft, div.factboxleft, div.leftobject { float: left; padding-right: 0.5em; } div.imageright, div.factboxright, div.rightobject { float: right; padding-right: 0.5em; } div.faxtboxleft, div.faxtboxright { background-color: #f0f0f0; } div.imageleft p.picturetext, div.imageright p.picturetext, div.imagecenter p.picturetext, p.factbox { padding-top: 0.2em; padding-bottom: 0.2em; } div.imageleft p.picturetext, div.imageright p.picturetext, span.picturetext, p.factbox { background-color: #f0f0f0; } /* MESSAGES TO THE USER */ div.description { background-color: #f8f8f8; padding-top: 0.1em; padding-bottom: 0.1em; margin-top: 0.4em; margin-bottom: 0.4em; } div.error, div.warning, div.feedback, div.highlight { margin-top: 0.5em; margin-bottom: 0.5em; padding: 0.25em; padding-left: 0.5em; padding-right: 1em; border-width: 0.25em; border-style: solid; background-color: #f8f8f8; } div.error { border-color: #c00000; } div.warning { border-color: #f0f000; } div.feedback { border-color: #00a000; } div.highlight { border-color: #000000; } div.error h2, div.warning h2, div.feedback h2, div.highlight h2 { margin-top: 0.25em; } /* OTHER OBJECTS */ hr { height: 1px; padding: 0; margin-top: 1.5em; margin-bottom: 0.5em; color: #c0c0c0; } .invisible /* This style can be used on element that should only be visible in a browser which doesn't support CSS. */ { display: none; }
core.css In design/mydesign/stylesheets/ /* eZ publish 3 core CSS - th[eZ] 20031105 */ /* Do not remove or delete this stylesheet, because some basic */ /* formatting methods in the system depends on it for proper display. */ /* Just modify and/or override styles where necessary, and remove all */ /* comments when they're not needed anymore (minimizes the file size). */ /* MAIN WINDOW SETTINGS */ body { font-family: Arial, Helvetica, sans-serif; background-color: #ffffff; } /* GLOBAL SETTING OF FONT SIZES */ /* All font sizes are set in % and most margins and paddings in em's, this is to make them all dynamic. */ h1 { font-size: 160%; } h2 { font-size: 120%; } h3, legend { font-size: 90%; } h4, h5, h6 { font-size: 80% } p, ul, ol, dl, blockquote, address, label, div.block input, div.block select, .normal, table.list, input.button, textarea /* This is the setting of the "regular" font size. */ { font-size: 80% } .small, div.byline p, p.picturetext, .factbox /* Be careful not to make this size unreadable by making it too small, i.e. usually not smaller than 65%. */ { font-size: 65%; } td.bglight .small, td.bgdark .small /* This is a trick to make the smaller size appear correct when using preformatted % sizes in the table lists. */ { font-size: 80%; } ul ul, ol ol, p label, div.block p input, p input, div.block p select, p select, div.block p textarea, p textarea /* This is to get nested lists to keep the correct size. */ { font-size: 100%; } /* HEADINGS */ h1, h2, h3, h4, h5, h6 { padding: 0em; } h1 { padding-top: 0.2em; margin-top: 0; margin-bottom: 0.5em; } h1, h2 { font-weight: normal; } h2, h3, h4, h5, h6 { margin-top: 0.75em; margin-bottom: 0.25em; } h3, h4, h5, h6 { font-weight: bold; } /* REGULAR PARAGRAPHS */ p { margin-top: 0.25em; margin-bottom: 0; padding-bottom: 0.25em; line-height: 1.25em; /* This is aprox. default line height in popular browsers. */ } pre { margin-top: 0.25em; margin-bottom: 0.5em; } /* LINKS */ a /* This is the standard formatting of all links if no other style is used. */ { color: #0000a0; text-decoration: underline; } a:hover { color: #0000c0; text-decoration: underline; cursor: pointer; } a img /* Some browsers may display a border around a linked image without this attribute set to _none_. */ { border: none; } /* Not currently used, but may be activated if needed. a:visited { color: #000000; text-decoration: underline; } */ /* TABLES */ table.list /* Used on all "proper" data lists presented by tables; i.e. not on tables use for general layout. */ { margin-top: 0.25em; margin-bottom: 0.5em; } table.list th, table.list td { padding: 0.1em; } th { font-weight: bold; text-align: left; } td { font-weight: normal; } td.bglight, td.bglightextra /* Light background color used on alternating lines in a table list */ { background-color: #f8f8f8; } td.bgdark, td.bgdarkextra /* Dark background color used on alternating lines in a table list */ { background-color: #f0f0f0; } td.tight /* Special style used for forcing a tabel cell to wrap tight around an image in an layout table. */ { font-size: 0.1em; } /* ORDERED AND UNORDERED LISTS */ ul, ol { padding: 0em; margin-top: 0em; margin-bottom: 0em; } ul, ul ul { list-style-type: disc; } ul { margin-left: 18px; } li { padding: 0em; margin-bottom: 0.3em; line-height: 1.25em; /* The combination of margin-bottom and line-height makes Internet Explorer and Opera set the same visual distance. */ } /* DEFINITION LISTS */ dl { padding: 0em; margin-top: 0.25em; margin-bottom: 0.25em; } dt, dd { font-style: italic; margin-top: 0em; margin-bottom: 0.25em; } dt { font-weight: bold; } dd { margin-left: 1em; margin-right: 1em; } /* FORMS */ form { padding: 0em; margin: 0em; } input.box, textarea.box { width: 468px; } input.halfbox, textarea.halfbox { width: 230; } input.quarterbox, textarea.quarterbox { width: 110; } input.shortbox { width: 4em; } fieldset { margin-top: 0.5em; margin-bottom: 0.5em; border: 1px solid #000000; } legend { font-weight: bold; } label { font-weight: bold; padding-right: 0.5em; white-space: nowrap; display: block; } div.labelbreak /* Used on an empty tag set after the label tag, to make it possible to change the label positioning in a instant. */ /* Standard display is _block_, but if set to _inline_ the labels will appear to the left of the input fields. */ { display: block; } input.button { font-weight: normal; margin-right: 1em; } input.defaultbutton { font-weight: bold; margin-right: 1em; } div.right input.button, div right input.defaultbutton { margin-right: 0em; } optgroup /* Newer browsers usually supports this tag; may come in handy to visually divide a select dropdown into several parts. */ { font-weight: bold; font-style: normal; } /* PAGE DIVIDERS */ div.left /* To be used with the div.right class, to align a left hand element to the left edge. */ { float: left; display: block; width: 50%; clear: right; white-space: nowrap; } div.right /* To be used with the div.left class, to align a right hand element to the right edge. */ /* Should be followed by the div.break class for proper float/break termination */ { float: left; text-align: right; display: block; width: 50%; clear: right; } div.block { display: block; clear: none; padding: 0em; margin-top: 0.25em; margin-bottom: 0.25em; } div.step { display: block; clear: both; margin: 0; padding-top: 0.25em; padding-bottom: 0.25em; background-color: #f0f0f0; border-bottom: dashed 2px #808080; } div.buttonblock { clear: none; margin: 0em; padding-top: 0.25em; padding-bottom: 0.5em; } div.step div.buttonblock { margin-bottom: 0em; padding-bottom: 0.75em; } div.element /* Used to position several elements next to each other horizontally. NOT on regular buttons. */ { float: left; display: block; padding-right: 1em; padding-left: 0em; clear: right; } div.break /* Used on an empty tag set after one or more div.element has been used, to ensure proper floating and breaking of the elements. */ { display: block; clear: both; } /* ARTICLE FORMATTING */ div.byline { /* No special formatting yet. To be filled in when needed. */ } div.bodyblock { padding-top: 0.25em; padding-bottom: 0.25em; } div.bodyblock p.body { display: inline; } div.imageleft, div.imageright, div.faxtboxleft, div.faxtboxright, div.leftobject, div.rightobject { margin-top: 0.3em; margin-bottom: 0.1em; display: inline; clear: none; } div.imagecenter, div.factboxcenter, div.centerobject { width: 100%; margin-top: 0.3em; margin-bottom: 0.1em; display: block; } div.imagecenter { text-align: center; } div.factboxcenter { text-align: left; } div.imageleft, div.factboxleft, div.leftobject { float: left; padding-right: 0.5em; } div.imageright, div.factboxright, div.rightobject { float: right; padding-right: 0.5em; } div.faxtboxleft, div.faxtboxright { background-color: #f0f0f0; } div.imageleft p.picturetext, div.imageright p.picturetext, div.imagecenter p.picturetext, p.factbox { padding-top: 0.2em; padding-bottom: 0.2em; } div.imageleft p.picturetext, div.imageright p.picturetext, span.picturetext, p.factbox { background-color: #f0f0f0; } /* MESSAGES TO THE USER */ div.description { background-color: #f8f8f8; padding-top: 0.1em; padding-bottom: 0.1em; margin-top: 0.4em; margin-bottom: 0.4em; } div.error, div.warning, div.feedback, div.highlight { margin-top: 0.5em; margin-bottom: 0.5em; padding: 0.25em; padding-left: 0.5em; padding-right: 1em; border-width: 0.25em; border-style: solid; background-color: #f8f8f8; } div.error { border-color: #c00000; } div.warning { border-color: #f0f000; } div.feedback { border-color: #00a000; } div.highlight { border-color: #000000; } div.error h2, div.warning h2, div.feedback h2, div.highlight h2 { margin-top: 0.25em; } /* OTHER OBJECTS */ hr { height: 1px; padding: 0; margin-top: 1.5em; margin-bottom: 0.5em; color: #c0c0c0; } .invisible /* This style can be used on element that should only be visible in a browser which doesn't support CSS. */ { display: none; } |
|
Tuesday 08 February 2005 3:13:36 pm
I am using Ez 3.5.0, but I started with 3.3 so core_article.css and core.css comes from 3.3. And my align problem started when I upgraded from 3.3.x to 3.4. |
|
Wednesday 09 February 2005 2:35:55 pm
Ok I cracked it. I just added the design/base/stylesheets/classes.css to my pagelayout tempate. |
|
Thursday 10 February 2005 12:32:32 am
> Ok I cracked it. I just added the design/base/stylesheets/classes.css to my Huh. That makes total sense. If eZ has values on the backend that it doesn't on the front end... voila. Problem.
> But I still get
Have you seen this?
From the docs, I see: So, it's not getting some kind of value that it's expecting to be able to unset in your template. Check the logs to see if there is a line number. That error is directly related to a missing variable or namespace I believe. But without tearing off the cover and reading the code, I'm not 100% sure exactly what. But that particular method is a member of the Template management class stuff. Jonathan --------- |