hi, I'm new here and new to doing anything that has to do with designing anything for the internet. The teacher I am designing a site for has me using dreamweaver 8. The problem I have is that some of the links are not showing up in dreamweaver and a browser in the color I want them to be in. In some cases the color shows up in dreamweaver but not a browser. Can someone help me in getting the color to show up? (the color does show up when I highlight the link in dreamweaver even if it isnt that color. and sometimes the text color box won't let me pick the color i want)

Dani AI

Generated

Quick practical follow-up to the thread: , the mismatch you saw between Dreamweaver and real browsers is usually a rendering or cascade/priority problem, not a Dreamweaver “bug.” pointed to the old HTML body attributes and / were right to push CSS — modern pages should use stylesheet rules and a simple debug flow.

Steps to quickly find and fix the problem

  • Save your files and open the page in a real browser (Design view in editors can be misleading).
  • Use the browser "Inspect" / DevTools on the anchor to see the computed color and which stylesheet/selector sets it. This shows whether a parent rule, inline style, or a more specific selector is overriding your link rule.
  • Confirm pseudo-class order and specificity: rules for link states can override one another depending on declaration order and selector specificity. Keep :link/:visited before :hover/:focus/:active (LVHA ordering) and avoid overly broad selectors that unintentionally style every a.
  • Remember modern browsers limit what you can change for :visited for privacy reasons (see MDN on :visited).
  • If Dreamweaver’s UI color picker won’t let you pick a color, edit the stylesheet directly and re-preview in a browser.

Practical pattern (put this in an external stylesheet attached to the page)

/* target a specific area so only those links change */
.nav-links a { color: #1e73be; }
.nav-links a:hover,
.nav-links a:focus { color: #0b4f85; text-decoration: underline; }
.nav-links a:visited { color: #5b5b5b; }

Accessibility note: ensure link colors have sufficient contrast against the background (use a contrast checker such as WebAIM). For details on deprecated body attributes and :visited restrictions, see the MDN references for the body element and the :visited pseudo-class.

Recommended Answers

All 6 Replies

I'm not familiar with dreamweaver... but open the code for the page in dreamweaver and look for the <body> tag. You can than change it for your links. You probably have the link color set, but the visited and active link colors are probably still default giving you undesired colors. Here is what you need to add/change in the <body> tag to set your colors.

link => changes the color of an un-visited link
alink => changes the color of a link that is currently being viewed
vlink => changes the color of a link that has been visited.

you can set them all to the same color if you never want the link color to change. To set the color simply put an = sign than the desired color in brackets. You can use the colors name or it's HEX code preceeded by a # (http://www.theodora.com/gif4/html_colors.gif)

For example:

<body link="#660000" alink="orange" vlink="FFFFFF">

I would use css for that.

a:link { color: blue }
a:visited { color: #0000FF }
a:hover { color: #0000FF }
a:focus { color: #0000FF }

I would use css for that.

a:link { color: blue }
a:visited { color: #0000FF }
a:hover { color: #0000FF }
a:focus { color: #0000FF }

Hi,

Yup I would definalty use CSS. If you get the time, check out the brilliant tutorials over at Adobe for CSS. I believe Adrian Senior had a good one that I learnt loads from. Once you get the basics of CSS you can change everything on a website. :)

thanks guys.

I would use css for that.

a:link { color: blue }
a:visited { color: #0000FF }
a:hover { color: #0000FF }
a:focus { color: #0000FF }

This is the way to do it. You may want to add more such as underlines this is done like so:

a:link { color: blue; text-decoration: underline;}
a:hover { color: blue; text-decoration: none;}
a:visited {color:black; text-decoration: none;}
a:focus {color:red; text-decoration: underline;}

This piece of CSS will make your hyperlink have no underline when the user hovers over it. It will also make the text color change to black when it has been visited and red when it is clicked on.

Hi,

Yup I would definalty use CSS. If you get the time, check out the brilliant tutorials over at Adobe for CSS. I believe Adrian Senior had a good one that I learnt loads from. Once you get the basics of CSS you can change everything on a website. :)

I would use css for that.

a:link { color: blue }
a:visited { color: #0000FF }
a:hover { color: #0000FF }
a:focus { color: #0000FF }

Try this:

a:link { color: blue; text-decoration: underline; }
a:visited { color: black; text-decoration: none;}
a:hover { color: pink; text-decoration: none;}
a:focus { color: red; text-decoration: underline; }

Give the above a try and that shoudl teach you a bit more about hyperlink styling.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.