Page title disappeared behind body - css

I created a new ASP.NET MVC application. The home page looks like this:
I tried to move the [ Log On ] link to the bottom of the page and got this:
What did I do wrong?
EDIT: [Here's][3] the CSS code, [here's][4] the original file, and [here's][5] the changed file.
(broken links to PasteBin removed)

Most likely, the CSS for your page has some preconceived notions of where and how big each will be, and you've confused it by moving them around.
In other words, the containing your main welcome block there does not use absolute positioning, but instead relies on a spacer (the login block) above it for correct spacing.

Related

How to use absolute links in Symfony without breaking app_dev.php?

This is the problem:
I have a menu link which I want to resolve to domain/course/2
This menu link is on a menu bar. The menu bar is visible on all pages of the web site including /home and /course/1
If I code the menu link like this:
href="/course/2"
then that works fine for navigation. However if I am on /domain/app_dev.php/course/1 then that style of doing the links loses the app_dev and I jump into production i.e. I go to domain/course/2 not /domain/app_dev.php/course/2. Not what I want.
However if I code the menu link like this:
href="course/2"
Then that does not break app_dev. However the navigation breaks. Because it is a relative path if I am in /course/1 when I click on that link I end up in /course/course/2 which of course (no pun intended) doesn't exist.
I can see how I can fix this by making my nav bar know what page (directory) it is being loaded on and set the links dynamically. But this feels a bit "hacky".
This must be a v. common problem with Symfony. How is it best solved?
Looks like you are generating links in "hardcode" style, instead of
href="/course/2"
you should use "path" function, so if you have the route name "closure" for your controller action, then you should use
href="{{ path('closure', {id: 2})}}"
Where "id" is expected action parameter. And I suppose you use Twig as template engine

Where should page hierarchies be rooted in Confluence?

I've recently started getting familiar with Atlassian Confluence (v. 3.3), but I'm having trouble understanding the best way to use page hierarchies within a space.
Within a space, pages can be located underneath the "Home" page, or one level higher, next to the home page. However, in the "Documentation" theme, the left sidebar page hierarchy is only shown for pages rooted below "Home". This means that the "Home" breadcrumb is always displayed when viewing pages that appear in the sidebar hierarchy.
So, what is the purpose of having pages on this top level? Should it be used specifically to hide pages from the sidebar hierarchy (like meta)?
Is it possible to have the sidebar hierarchy display for pages rooted next to Home (on this top level), instead of below it?
Is it possible to remove the Home breadcrumb?
How many of these questions are made irrelevant by later updates to the software?
The only real purpose I can think of for having a page on the same level as the home page would be to disclude it from a page-tree display starting at the home page. So if you have some pages you use for holding images, documents, testing content, et cetera then you would not want it to show up in the hierarchy viewed by regular users.
When you define a page-tree macro, or the children-display or anything similar, you can specify which page it is displaying the hierarchy from. If you want to use a page other than the home page, just specify it in the page-tree macro.
I don't believe it is possible to remove the breadcrumb, or at least I don't know how.
Software updates will maybe bring some other page-tree-esque options but won't fundamentally change anything else we're talking about here.
So, what is the purpose of having pages on this top level?
Specifically? You'd have to ask Atlassian.
Generally? The default configuration is that only pages from the specified Home page down are shown in the navbar.
Should it be used specifically to hide pages from the sidebar hierarchy (like meta)?
Yes. Any page which is used for navigation, control or configuration is stored at the top of the hierarchy. That way they don't show up in the navbar.
Using the {alias} macro will create a page in the top hierarchy.
If you use a page as input to your navbar then this page can be stored here out of user sight but still publically visible. So, if you had a page with lots of markup for a colourful and exciting navbar named SpaceNavigation then in the Documentation Theme Configuration you would have this code:
{include:SpaceNavigation|nopanel=true}
Is it possible to have the sidebar hierarchy display for pages rooted next to Home (on this top level), instead of below it?
Yes. Use the pagetree macro.
{pagetree:root=#none}
You can edit the space theme to show anything in the left navigation bar.
Browse > Space Admin > Theme > Configure theme
Untick the 'Page Tree' option at the top. Put your code to display content in the navbar in the navigation box.
If you want a pagetree somewhere in your custom navigation use the {pagetree} macro. You can set the root page to a page lower in the hierarchy. {pagetree:root=apple}
The {children} macro is also useful here.
The reporting macros can print a list of all pages in a space. You can build your own macro or import a wiki page to display as the navbar.
Is it possible to remove the Home breadcrumb?
This may need clarification. Are you looking to remove the breadcumbs or just the word 'home'.
Either way, the answer is 'JavaScript or CSS'.
If you are a space administrator you can add CSS styles to the space to disable CSS for the space from the header.
If you have the {html} macro or {style} then you can add styles and JavaScript to the wiki page.
If you are a wiki administrator, or have one on your side, then you can create a macro or plugin to put CSS or JavaScript code on the page.
Here is a code sample to find two classes on a page and after the page has loaded (document.ready) hide them.
{html}
<script type="text/javascript">
AJS.$(document).ready(function() {
AJS.$(".first").hide();
AJS.$(".second").hide();
});
</script>
{html}
This example will remove the word 'Dashboard' as it has the class of 'first'.
Go forth and write the code to find the objects that so draw your ire and vanquish them.
CSS is also an option and sometimes less messy.
Some CSS objects can be removed from the page from within the page. E.g:
{html}
<style type="text/css">
ol.breadcrumbs { visibility:none; !important; }
</style>
{html}
However, to remove objects at the top of the page you need to use javascript or put CSS in the space style sheet.
Browse > Space Admin > Stylesheet
How many of these questions are made irrelevant by later updates to the software?
It's pretty much the same. Some styles have changed. Some things have been moved around. The general look has changed.
Some of the style sheets have changed and they have said that they are looking to deprecate the Documentation Theme. However, given the community support for the Documentation Theme even if they remove it no doubt it will be available as a downloadable theme in V6.
If you are interested in looking at this yourself then you can download Confluence V5 with a trial licence or try their OnDemand free for one month.

stop page from jumping back to top when empty <a> tag is clicked

The title says it all, how would I make it using only html, no JAVASCRIPT, to stop the page from jumping back to the top if a user clicks on an empty tag? So for example, if at the very bottom of my site, I have a link that is empty, but click on it, it takes be clear back up to the top...
A simple solution to this would simply put in the a tag:
Title
In doing this, it won't scroll your page back to the top. To have it scroll back to the top, take out the a after the # symbol...so it would look like this:
Title
That is the best explanation I can give you without any code provided from you.
Give that a try and it should work with what you are asking for...No javascript is needed. In fact you can even make the #a jump to a different location if you'd like on your page :)
UPDATE:
This may suit you better! Add this to either a js file or add it inline with you html document.
Separate js file (just make sure to call it externally on your html file):
$('#Add_Your_Id_Or_Class_Here').removeAttr('href');
Example: $('#link a').removeAttr('href'); or $('.link a').removeAttr('href'); or even $('a').removeAttr('href');
Now, if you want to achieve this via inline on your html file, simply do this:
<script>
$('#Add_Your_Id_Or_Class_Here').removeAttr('href');
</script>
Again, you can use any of the examples above as well. In fact there are many ways you can achieve this now that I think about it...Hope that helps :)
If your link isn't supposed to be linked (such as when it's just a placeholder for where a link could be) then you should not add an [href] attribute to the <a> element

FancyBox not working in asp.net

I have downloaded fancybox-1.3.4, I tried using it with one of my pages(which has a master page which has the same DOCTYPE as index.html of fancybox-1.3.4) I copy pasted the entire code(subtracting head, body etc) but it doesn't seem to work, however, if I copy paste the entire code(including doctypes etc. all) to a new Default.aspx without master page, it work perfectly.
please
Help me out here.
I agree with the other posters; it's hard to know without seeing the code. But master pages do change the client IDs on the page. If you're calling the fancy box by ID, you might want to try it with a css class.
i.e.
$(".fancy").fancybox();
...
click here
instead of:
$("#my_link").fancybox();
...
click here

master page images not showing on child pages

This is probably something really simple but I cant see what!
Any images I have in a masterpage aren't showing up in child pages,
all I get is the box with the red cross in it.
I don't think Ive done anything different from usual and it's not something that's
happened in other sites so im kinda scratchin my head with it.
Any ideas are appreciated!
Kevin's got the essence of the problem right - your URL in your master page is likely relative to the location of the master page, and when it's included in the child page, the relative reference isn't correct anymore. The simplest solution for this sort of thing is to have your master page URLs be relative to the site, not the page. In other words, if you've been doing
<img src="images/picture1.gif">
You need to replace that with
<img src="/images/picture1.gif">
or something similar.
in the master page you use the image src similar to the below line and this will work. this same problem solved usig this way.
src="<%= Page.ResolveUrl("~")%>Images/myimage.png"
Did you give the image runat="server" and use a root relative "~/" path to the file?
The URL to your image is incorrect.
Try using absolute paths to your images.
I've had this problem when using a master file with content pages in different subdirectories.
If you use relative paths to your images, thay should be relative to the content page, not the master.
Edit: This is true if you use the img tag to display your images. asp:Image behaves better =)
It definitely sounds like you have a pathing problem. View the source to your rendered page and take a look at where it's trying to load the image from, that should help you fix your path.
If you set the right path then also you are getting the same problem then you can try this will definitely solve your problem:
Use double dots(..) before the starting of url.
If Content pages are located inside subfolders this problem arises. When a content page is rendered the markup is generated afresh for the master page content as well, and the location of an image may render differently as it appears in the master page. The best way is to replace with asp:Image control instead of HTML image tag. Then define the absolute starting with:~/ to actual location of the image. This should solve the problem. Please remove the entire image tag before inserting asp:Image as attributes are different for both.
Good Luck !!.
If you use image<img> tag instead of this, please use "style="background-image: url('/Images/welc.jpg');"in any other tag. This looks like a silly.But it works for me. I was also getting this problem,after using this thereafter I got image at all my child pages.

Resources