Problem changing link colour

On a particular page, within a text box, I need to change the colour of links so that they stand out more clearly against the text and the background. I have been trying this with Link Inspector → Extended Attributes → Text → Text Color. This shows the required colour in the XWay WYSIWYG page but, on publishing, I am ending up with two different HTML strings.
This works perfectly:
text on page Link text page continues
This has no effect on the link colour, that goes to the default link colour elsewhere on the site:
text on page Link text page continues
I am curious that exactly the same procedure in XWay has two quite different results. I have checked that it is not simply a matter of refreshing the browser. I have tried removing and replacing the link several times, publishing, previewing, saving each time. I reset the box default link style to the colour required and tried again. Looking at the page code, the quickest solution is to open up in BBEdit and add in around the link text, though I need to find out what I have been doing differently (and in at least 95% of attempts) to produce the HTML that is different from what I need.

Hi John,

The best way to set link styles for a particular box is to go to the Default Styles section in the Box Inspector and choose “Link” (and “Visited Link” etc.) from the Element popup. This will set up styles for links that are within a box.

You can also set link styles for pages (Default Styles in the Page Inspector) and documents (Default Styles in the Document Inspector).

There’s a step-by-step guide for setting link styles in the Xway Tutorial. This is available from the Xway Resources section of our website (click on Xway Resources in Xway’s Help menu). Search for “Link Styles”

For more information on link styles, click on “Xway User Guide” in Xway’s Help menu and search for “Styling links”.

Don’t forget that there are separate colours for unvisited links and visited links.

Jeremy

On 14 May 2020, at 12:52, John Whittaker email@hidden wrote:

On a particular page, within a text box, I need to change the colour of links so that they stand out more clearly against the text and the background. I have been trying this with Link Inspector → Extended Attributes → Text → Text Color. This shows the required colour in the XWay WYSIWYG page but, on publishing, I am ending up with two different HTML strings.
This works perfectly:
text on page Link text page continues
This has no effect on the link colour, that goes to the default link colour elsewhere on the site:
text on page Link text page continues
I am curious that exactly the same procedure in XWay has two quite different results. I have checked that it is not simply a matter of refreshing the browser. I have tried removing and replacing the link several times, publishing, previewing, saving each time. I reset the box default link style to the colour required and tried again. Looking at the page code, the quickest solution is to open up in BBEdit and add in around the link text, though I need to find out what I have been doing differently (and in at least 95% of attempts) to produce the HTML that is different from what I need.

Many thanks Jeremy, that pointed me in the right direction. As I said in my post, I had set the default link style on the Box Inspector and read all of the Guide on “Styling links”. I was misled by the following on p.78: “You can also use the Default Styles section of the Box Inspector to define default link styles. You can define separate styles for normal links, visited links” etc. What it does not say is that the Normal style is not carried over to the Visited style, and I had already previewed the page. It seems one needs to reset everything (or at least Normal and one other).

Hi John,

What it does not say is that the Normal style is not carried over to the Visited style

It’s not completely straightforward. There are separate colours for normal and visited, but other properties (such as underlining) are shared between them.

I think that (by default) visited actually inherits most of its properties from link (except for colour).

Jeremy

I’ve been creating a simple site following the tutorial to create links for the Nav box that will appear on every page. I then tried to place a link in some text in the Main box and changed the link style in the box inspector. When previewing, I found that the style I set up initially in the document inspector over-rode the changes I’d made in the box inspector. I’ve looked at various ways of overcoming this without success. I finally selected the text and tried to delete it, at which point Xway crashed.
Having read the above thread, it seems it ought to have worked, any ideas?

Geoff

Hi Geoff,

Link styles that are set on boxes override link styles that are set in the Document Inspector.

If can send me a file where this is not happening, I’d be happy to take a look at it. If the file isn’t large, send it to support at softpress dot com.

Jeremy

On 26 May 2020, at 09:46, Geoff Mullett email@hidden wrote:

I’ve been creating a simple site following the tutorial to create links for the Nav box that will appear on every page. I then tried to place a link in some text in the Main box and changed the link style in the box inspector. When previewing, I found that the style I set up initially in the document inspector over-rode the changes I’d made in the box inspector. I’ve looked at various ways of overcoming this without success.