Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Dreamweaver Link Colours

  • 10-01-2007 10:34pm
    #1
    Closed Accounts Posts: 20


    Very VERY new to Dreamweaver and all this stuff so this MIGHT be a really stupid post....but I need help

    Basically, I want the hyperlinks on my page to remain their allocated colour (im from the UK so it IS colour for me... :P).

    I have tried

    a:link {
    text-decoration: none;
    }
    a:hover {
    text-decoration: underline;
    }

    in my CSS but this just makes the hyperlink the default Blue.

    I realise typing in a colour into text-decoration would change this, but the links are not ALL the same colour, therefore I want them to remain the colour they have been allocated.

    This is my website atm (only just started, its PHP+MySQL) http://www.itsgameover.co.uk/index1.php

    I want all those "pHanQ vs ..." to be hyperlinks and remain Black, and the scores to be hyperlinks (to the same place) but remain their respective colours.

    There must be an easy way to do this...anyone? Thx! <3


Comments

  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    You have to specify a link colour if you want it to be anything other than the standard blue. Your best off defining a class for them, so in your css do something like

    .links_class a:link {
    text-decoration: none;
    color: #000000;
    }

    And then you have your <a href="place.html" target="_self" class="links_class">Link</a> etc.

    And similarly for the scores. Thats the only was as far as I know. I don't think there's an attribute to not change the existing colour, you just have to specify it seperately.


  • Closed Accounts Posts: 20 hearmeroar


    Thanks Man! Used something very similar to your method: Used this <span> tag with this in my CSS (Sorry this is looong :P)

    .Black a:link {
    font-family: Tahoma;
    font-size: 9px;
    color: #000000;
    text-decoration: none;
    }
    .Black a:visited {
    font-family: Tahoma;
    font-size: 9px;
    color: #000000;
    text-decoration: none;
    }
    .Black a:active {
    font-family: Tahoma;
    font-size: 9px;
    color: #000000;
    text-decoration: none;
    }
    .Black a:hover {
    text-decoration: underline;
    font-family: Tahoma;
    font-size: 9px;
    color: #000000;
    }
    .Green a:link {
    font-family: Tahoma;
    font-size: 10px;
    color: #88A62A;
    font-weight: bold;
    text-decoration: none;
    }
    .Green a:visited {
    font-family: Tahoma;
    font-size: 10px;
    color: #88A62A;
    font-weight: bold;
    text-decoration: none;
    }
    .Green a:active {
    font-family: Tahoma;
    font-size: 10px;
    color: #88A62A;
    font-weight: bold;
    text-decoration: none;
    }
    .Green a:hover {
    font-family: Tahoma;
    font-size: 10px;
    color: #88A62A;
    font-weight: bold;
    text-decoration: underline;
    }
    .Red a:link {
    font-family: Tahoma;
    font-size: 10px;
    color: #A33943;
    font-weight: bold;
    text-decoration: none;
    }
    .Red a:visited {
    font-family: Tahoma;
    font-size: 10px;
    color: #A33943;
    font-weight: bold;
    text-decoration: none;
    }
    .Red a:active {
    font-family: Tahoma;
    font-size: 10px;
    color: #A33943;
    font-weight: bold;
    text-decoration: none;
    }
    .Red a:hover {
    text-decoration: underline;
    font-family: Tahoma;
    font-size: 9px;
    color: #A33943;
    font-weight: bold;
    }
    .Blue a:link {
    font-family: Tahoma;
    font-size: 10px;
    color: #5086AC;
    font-weight: bold;
    text-decoration: none;
    }
    .Blue a:visited {
    font-family: Tahoma;
    font-size: 10px;
    color: #5086AC;
    font-weight: bold;
    text-decoration: none;
    }
    .Blue a:active {
    font-family: Tahoma;
    font-size: 10px;
    color: #5086AC;
    font-weight: bold;
    text-decoration: none;
    }
    .Blue a:hover {
    text-decoration: underline;
    font-family: Tahoma;
    font-size: 9px;
    color: #5086AC;
    font-weight: bold;
    }


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Precisely! Nice work for someone who's "very VERY" new to DW, good to see you're learning the code too! ;)


  • Closed Accounts Posts: 20 hearmeroar


    Thanks :)

    Ive been using Dreamweaver about 4 days now, thats the Design side of it anyway, Ive been doing A Level Computing Coursework for a couple of months which is the PHP/MySQL coding bit.

    So I'm far more comfortable with the code at this point.

    Feel free to keep track of my progress or whatever :P, the URL is www.itsgameover.co.uk

    Thx again man! :D


  • Closed Accounts Posts: 20 hearmeroar


    Oh, another thing, Ive used some PHP echos to replace certain bits of code (because Dreamweaver was saying "You have unclosed tags!" etc when I intertwined the HTML and the PHP) and now the Design view has been COMPLETELY ruined...Ever experienced this? Know a way around it?

    Perhaps if I pull the HTML back out the Echos, finish the tags so Dreamweaver is happy but surround the "fake" close of tag in <?php /* ?> </a> <?php */ ?> or something...

    Problem is I cant find the piece of code that I have thrown into an Echo that messed the Design view up :/

    Any ideas? Thanks


  • Advertisement
  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    When it comes to PHP, DW is useless. I'm pretty sure it can't even parse it, so ANY php you use will be completely ignored. Do you have a local developement environment installed e.g. Apache? Thats the only way to parse php locally, and even at that I'm not aware of anyway to get DW to incorporate Apache or anything similar.

    It's a bit misleading really, in DW(mx at least, dont know about other versions) when you open the program, the splash page has a quick link to create a new PHP page, but all that means is type away some php, it can't parse it at all and you may as well just be using notepad!

    EDIT: Just watch the css you've done for the match scores, you've used 10px for links and 9px for when you hover, but not on the green ones. Also I think the 1px is whats causing the "jump" effect when I hover, in FF mind, maybe not in IE.


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Dreamweaver isn't too bad for PHP, but it is tough to use when you first start out with web programming. It should be possible to code most pages so that all tags have an explicit closing tag (i.e. that you're not relying on PHP output to close a tag), but as I say it does take some time to get used to it.

    I wouldn't write off DW as a PHP IDE. It takes in the contents of include() tags in design view (provided those includes contain some raw HTML), and also provides syntax highlighting and code completion better than I've seen in any other IDE.

    For the moment OP, you may be better off ignoring design view when developing. What I tend to do is to look at the page after it's output, then paste the outputted HTML into a blank document in DW, and look at the design view to locate the flaws/errors. Then you refer back to your PHP document and correct them.


  • Closed Accounts Posts: 4,655 ✭✭✭Ph3n0m


    I have found using Homesite+ to be a better option when it comes to coding PHP, it does seem to be a tad smarter when it comes to showing incomplete tags or possible parsing problems (un-escaped " for example)


  • Registered Users, Registered Users 2 Posts: 706 ✭✭✭DJB


    Can I just say that "colour" is spelt the same in Ireland as it is the UK! :D

    Your code is quite long and in the long run it might become "unmanagable" or awkward to manage so here's a change to make it work the same but make it easier to manage. Plus it's less code for the user to download.
    .black a, .green a, .red a, .blue a { font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 10px; text-decoration: none; }
    .black a { color: #000000; font-size: 9px; }
    .green a { color: #88A62A; }
    .red a { color: #A33943; }
    .blue a { color: #5086AC; }
    .black a:hover, .green a:hover, .red a:hover, .blue a:hover { text-decoration: underline; }
    .black a:hover, .red a:hover, .blue a:hover { font-size: 9px; } /* don't know why you are changing the font size on hover, usually looks bad IMO. Delete this line to keep everything at 10px. /*
    

    Just thought I'd point you in the right direction for cleaner code.

    Rgds,

    Dave


  • Closed Accounts Posts: 20 hearmeroar


    Thx guys. I said the "colour" thing because the original post was on some US forums and I just pasted it across, hehe.

    I am now completely rebuilding the page, this time ensuring the design view doesnt become messed up due to echo'ed HTML.

    It needed a rebuild anyway, I got far better at Table formatting at the end then in the beginning so the stuff at the start is all messed up. But now I can use what I learnt by the end in the rebuild :)


  • Advertisement
  • Closed Accounts Posts: 216 ✭✭delanest


    I'm having a problem with this too. When I do the below, it looks good in Dreamweaver and in Firefox. When I test it in IE. 6, the links go back to being the default blue and change the position. Its as if IE is not reading the CSS for these links ??:confused:





    <div class="contact"> <a href="contact.html" target="_self" class="contact">Contact</a></div>


    .contact a:link {
    position: absolute;
    left: 450px;
    top: 312px;
    width: 72px;
    font-family: "Times New Roman", Times, serif;
    font-size: 10pt;
    height: 28px;
    font-weight: 900;
    text-decoration: underline;
    color: #FFFFFF;
    }


  • Registered Users, Registered Users 2 Posts: 706 ✭✭✭DJB


    delanest wrote:
    I'm having a problem with this too. When I do the below, it looks good in Dreamweaver and in Firefox. When I test it in IE. 6, the links go back to being the default blue and change the position. Its as if IE is not reading the CSS for these links ??:confused:





    <div class="contact"> <a href="contact.html" target="_self">Contact</a></div>


    .contact a:link {
    position: absolute;
    left: 450px;
    top: 312px;
    width: 72px;
    font-family: "Times New Roman", Times, serif;
    font-size: 10pt;
    height: 28px;
    font-weight: 900;
    text-decoration: underline;
    color: #FFFFFF;
    }
    I'd say you have already visited the page in IE and IE is treating it as a "visited" page. Change it to:

    <div class="contact"> <a href="contact.html" target="_self" class="contact">Contact</a></div>


    .contact a {
    position: absolute;
    left: 450px;
    top: 312px;
    width: 72px;
    font-family: "Times New Roman", Times, serif;
    font-size: 10pt;
    height: 28px;
    font-weight: 900;
    text-decoration: underline;
    color: #FFFFFF;
    }


Advertisement