SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2002
    Location
    Northern Ireland
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Two wee problems with CSS and Dreamweaver

    How do all?

    Whn I apply a newly created style in Dreamweaver 4 by highlighting the hyperlink and selecting the style from the styles pop-up box its not applying the Style to the correct place in the HTML. It seems to be applying <span>?

    For example I have highlighted in bold below where DW is applying the style (hope this works?)

    <br>
    </font><b><a href="arrangem.doc" target="_blank"><span class="rollover">ADVANCED INFORMATION</span></a></b><br>
    <br>

    I'm having to go into the HTML of each page manually and apply the style which is a pain. Can any please help please?

    Quickie-related query Two, how do you apply a hyperlink text rollover effect on DW 4 please.

    Regards as always.

    Andrew

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not so sure this is a question for dhtml & Javascript.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Two wee problems with CSS and Dreamweaver

    Originally posted by Andrew_Sam
    How do all?

    Whn I apply a newly created style in Dreamweaver 4 by highlighting the hyperlink and selecting the style from the styles pop-up box its not applying the Style to the correct place in the HTML. It seems to be applying <span>?

    For example I have highlighted in bold below where DW is applying the style (hope this works?)

    <br>
    </font><b><a href="arrangem.doc" target="_blank"><span class="rollover">ADVANCED INFORMATION</span></a></b><br>
    <br>

    I'm having to go into the HTML of each page manually and apply the style which is a pain. Can any please help please?

    Quickie-related query Two, how do you apply a hyperlink text rollover effect on DW 4 please.

    Regards as always.

    Andrew
    In DW, I expect you just need to go to Edit > Preferences and change the CSS formatting options.

    To make a text hyperlink rollover, use the hover pseudo-class selector.

    [code]
    a:link { color: #000000}
    a:visited { color: #000000}
    a:hover { color: #FFFFFF}
    a:active { color: #000000}
    [code]

  4. #4
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Two wee problems with CSS and Dreamweaver

    Originally posted by Andrew_Sam
    Quickie-related query Two, how do you apply a hyperlink text rollover effect on DW 4 please.
    ...and to do that in DW4 (as asked )...

    Better to let Macromedia explain it for me...

    http://www.macromedia.com/support/dr...nts/ahover.htm

    Hope this helps
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  5. #5
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bill -> Can i rant about hand coding - please?

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  6. #6
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Flawless_koder
    Bill -> Can i rant about hand coding - please?
    Have you been a good boy this week?

    You have? Gooood.

    Then go knock yourself out, kiddo


    Fwiw, I also prefer to do it by hand (implement pseudo-classes, that is).

    What did you think I meant?
    Last edited by Bill Posters; Jul 19, 2002 at 18:22.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  7. #7
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    * hmmm, hum *

    So - where do we start.

    Learning to hand code is a good thing.

    It gives you far more flexibility for controlling the content of your site in wierd and wonderful ways.

    You learn how to improve your code and make it more efficient.

    All respect to the amazing way in which code generators such as dreamweaver do what they do, but their functions are still generic.
    Without the artificial intelligence to spot when something could be done better in another way, perhaps with css or dhtml, the program often generates far too much code.

    This could never be truer than when you're dealing with scripting. The amount of excess code used - and randomly generic functions put in to try and make the code work in
    all browsers is absolutely unbelievable.

    You'd find it a seriously useful step in the right direction
    to start the long path to web development enlightenment by learning the insides of HTML, DHTML and Javascript.

    < / rant >

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  8. #8
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In order for Dreamweaver to correctly place the class onto the ANCHOR object, you should click on the <a> in the breadcrumb nav at the bottom of the editor (I think they call it the tag selector...) You know...that cool little heirarchial thingie that lets you select code chunks even while in design view? (might look like this: <body><table><tr><td><a>)

    If you don't, DW will ALWAYS add the SPAN, because when you highlight the text in the WYSIWYG it just selects the text within the ANCHOR.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  9. #9
    SitePoint Enthusiast
    Join Date
    May 2002
    Location
    Northern Ireland
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Flawless_koder aplogies if I posted onto the wrong Forum.
    I didn't see a DW-specific one so did a search for DW and this came up trumps.
    Regarding your recommendation to Hand Code I'll take your advice and read up on it. If this problem has taught me anything its to rely less on WYSIWYG Editors.

    glenplake & Bill Posters thanks for the code and link respectively.

    beetle - Top Tip re: the a> in the breadcrumb nav at the bottom of the editor.

    Many thanks all.

    Regards

    Andrew

  10. #10
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good luck Andrew.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •