Anchor display problem
Auteur : Marius T.
Visité 2925,
Followers 1,
Partagé 0
Hello all
I have a minor problem regarding the display of the content called with an anchor link: when clicking the title text it goes to that paragraph but the title and maybe one row of the paragraph is covered by the Sticky Bar.
It does not show like attach but the title is covered so the page must be scroll down a little. Which is ...
I tried with cell style and inner / outer margins. I treied with an empty HTML object but it does not linked to an emty object.
What should I do? I always have one or a few rows wrong displayed.
Thank you!
Posté le
Marius
You could try setting opacity of the sticky bar to something less than 100%, but I have found the best way is to place a cell immediately above the required cell and move the label to it. Most of the time I add the appropriate heading in this cell which assists people who scroll to rather than select a menu button. It is just a matter of placing the appropriate carriage returns above and below the title, setting the font size and perhaps use style to set background colour and border.
If you do not want a heading, just a blank space, I use a single colour image of appropriate size and I set the colour transparent, I then place the image in a text cell above and move the label, it does not matter that it is then hidden below the sticky menu.
Hope one of the above is your preferred solution.
Auteur
Hi Esahc ...
I am afraid that I can't understand: it is impossible to make a link (anchor or else) to an empty cell. In this example http://esahc.com/marius/index.html you have set the link properly but stil there is an extra cell called Anchor 1 ... 2 and so on. You have made the anchor link to that cell called Anchor 1 so the content of the cell bellow to be shown.
Ok, but I am searching for a solution that brings the user right to the cell that he is searching for. not the Sticky bar transparent, no.
Thank you, as always :-)
Marius, sadly you are not going to find such a solution unless you turn off the sticky bar, after all, there is a return to top button always on the page to return to the menu for navigation. You cannot link to an anchor in an empty cell.
Personally I like using the cell above, with the title in it and used as the anchor, if it annoys you to have the title obliterated, simply add a few carriage returns above the title.
If this annoys you, perhaps it's time for an idea post requesting the anchor be offset down the screen the depth of the sticky bar.
:-)
Sorry, there is another way. . .
You can use html code embedded on a page, but I rather prefer the ease of using WX5 to achieve this in spite of the limitations
http://www.myhtmltutorials.com/jump.html
Hello Marius
I maybe have a solution for this.
You can look here : http://www.bramminginfo.dk/brm02/s.-ansgar.html#section2
Is it something like this you mean ?
Auteur
Hello, this is what I want but how can I achieve this in X5?
Hello Marius
What I have made here is a bit complicated ( I use js for the navigation block ) . But as for the anchor I started with a more ( rather ) simple version.
Later today ( or tomorrow ) I will make an example, where I will show how it functions ( the anchor ) and the code needed.
The example will be made purely in html and CSS. And it requires not much code in a html-object.
Is this OK with you ?
Kind regards
John S.
Auteur
Hi
If it can be made inside of X5, yes, thank you!
It can be made inside X5. As said - it is purely HTML and CSS.
Auteur
Seems that modifying the style for both text title and text paragraph below it works somehow ... thank you all!
Hello Marius
I have made an example here : http://www.bramminginfo.dk/brm09/side-22.html
If you are interested I can show on the page how it is made.
If you already have figured it out yourself I will do no more about this.
Are you interested in the code. There is not much code :
Kind regards
John S.
Auteur
Thank you John for your time and effort but since I have solved it with cell style it is solved. It is a lot to work and I try to do it as simple as I can.
Thank you again, really appreciated!
Hello Marius
Good you have it solved.
What I show, is made with an offset of the anchors. This way you will have no empty space anywhere on the page.
The anchor simply directs to the "top", but the top for anchors is defined as - x pixels.
It can of course be done "quick-and-dirty" by making a dummy-anchor in a html object ( just above the wanted block ) with a height equal to the menu height.
My example is made with the offset. There is no dummy-space to be behind the menu.
But most important is, that you had your problem solved.
Kind regards
John S.
Auteur
What an original idea! Yes it sounds good.
I can see that the margins can be set inside the Style only by pixels not by procent ... oh, oh, oh.
Hello Marius
The margins is set by using the standard in X5. Here is the setting/styling for the upper left html object.
I have used ( not edited ) the outer and inner margin that is set in X5.
I will later today on the page show the content of each html-cell, so you can see how it is done.
Kind regards
John S.
Hello Marius - and others that could be interested.
I have now made some explanation to the "alternative anchors".
The testpage can be seen here : http://www.bramminginfo.dk/brm09/side-22.html
And the eplanation is in "blok04" here : http://www.bramminginfo.dk/brm09/side-22.html#blok04
Hope someone can/will use this.
I also hope that INCOMEDIA will make a possibility for an offset for the normal anchors. An offset that you can set for a page or for a project.
Kind regards
John S
I just adjusted the length of the first text. Now it should function in all resolutions.