as you can se the 3 bloks i have made dos no site right as the er below onenother and not side to side and the greay bar one only se a part of is my fotter.
wath iam planing whit thess macros is to make som statik elements to use all over the site an call them easy.
the lather when iam mor confedent whit macros i try makining the so i can put drifring content in tu them.
The problem is that you're having a bad practice making empty div containers like <div id="Header></div>. But in the master template you can get away with it since it's outputted in the html source as <div id="Header"></div>. Just the way you have written it.
But since you have a macro based on XSLT where you do the same with for instance <div class="SideBottom"></div> it ends up being written to the final HTML output like <div class="SideBottom" /> - So the container acts as a self-closing tag.
So if the container is empty make sure it's not being written to the source by using a control structure where you make a check to see if a certain value is set and then write out the code. Or simply just write some dummy content like lorem ipsum text. That will fix it.
So this is not a CSS issue you just need to write some dummy content untill you begin fetching the actual content from your content section.
When you do remember to add the logic so no empty tags occur in your output.
In the above I totally forgot to mention the most important thing actually.
The reason why the empty divs from the XSLT macro collapse is because the output mode is set to XML, which turns empty containers into selfclosing elements using the shortcut.
You can change the output mode to HTML and then it will also work.
i vil not say that i had a bad practice making empty div, i was not aware that it can cours problems. and as you se the site i under cunstrukt so not all data was avalibele.
But one lean all life and i dit som to day.
i whent whit the HTML solutions becors i need the SideBottom to be emty så it is posibel to put data if it is neede not all bloks need data in the SideBottom
CSS trubble when loading macro
Hey i hope i putt the problem the right place.
iam tryning to build a website for my wow guild so we dont have to pay for a site.
iam running version Umbraco v6.1.2 (Assembly version: 1.0.4927.23554) Hostede on a Surftown server IIS 7.0 whit fullthrust on a CE database.
the site is @ this local http://wiyd.mj-solutions.dk
as you can se the 3 bloks i have made dos no site right as the er below onenother and not side to side and the greay bar one only se a part of is my fotter.
wath iam planing whit thess macros is to make som statik elements to use all over the site an call them easy.
the lather when iam mor confedent whit macros i try makining the so i can put drifring content in tu them.
i realy hope som can help me
Best regards
Michael
Ps sorry for my bad english writning
my master page is like this
the CSS i use on the page
this is the pagetamplate for the page i load the blok
this is my macro thear is 3 macros bu all made whit samm struktur like this one only CSS is drifrint
CSS uset in macro
Hi Michael
The problem is that you're having a bad practice making empty div containers like <div id="Header></div>. But in the master template you can get away with it since it's outputted in the html source as <div id="Header"></div>. Just the way you have written it.
But since you have a macro based on XSLT where you do the same with for instance <div class="SideBottom"></div> it ends up being written to the final HTML output like <div class="SideBottom" /> - So the container acts as a self-closing tag.
You can easily pick this error up by using the W3 validator, which I did here http://validator.w3.org/check?uri=http%3A%2F%2Fwiyd.mj-solutions.dk%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
So if the container is empty make sure it's not being written to the source by using a control structure where you make a check to see if a certain value is set and then write out the code. Or simply just write some dummy content like lorem ipsum text. That will fix it.
So this is not a CSS issue you just need to write some dummy content untill you begin fetching the actual content from your content section.
When you do remember to add the logic so no empty tags occur in your output.
I hope this makes sense and helps.
Cheers,
Jan
Hi Michael
In the above I totally forgot to mention the most important thing actually.
The reason why the empty divs from the XSLT macro collapse is because the output mode is set to XML, which turns empty containers into selfclosing elements using the shortcut.
You can change the output mode to HTML and then it will also work.
/Jan
Hey Jan,
i vil not say that i had a bad practice making empty div, i was not aware that it can cours problems. and as you se the site i under cunstrukt so not all data was avalibele.
But one lean all life and i dit som to day.
i whent whit the HTML solutions becors i need the SideBottom to be emty så it is posibel to put data if it is neede not all bloks need data in the SideBottom
Thanks wary mouts for the help.
is working on a reply...