SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Image border colours ....

    I'm not sure why, but for some reason my image border colour won't work. Here's my CSS:

    Code:
    .img {
    	border: 2px solid #FFFFFF;
    
    }
    I also tried:

    Code:
    .img {
            border-colour: #FFFFFF;
    	border: #FFFFFF;
    
    }
    Neither work. My image border resolutely refuses to be anything other than black. Why is this?

    G

    Ps -- I worked around it by putting the image in a table cell of equal size with a border, but that's not ideal.

  2. #2
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think the problem is more fundamental...you're using a class selector...that's why.
    it would work if, in your image tag, you also add
    Code:
    <img src="whatever.gif" class="img">
    but what you want is to define the style for the tag itself, hence
    Code:
    img {
    	border: 2px solid #FFFFFF;
    
    }
    (without the dot in front of img)

    p.s.: it's border-color, not border-colour...CSS uses the yanks' incorrect spelling
    Last edited by redux; Jan 24, 2003 at 05:42.
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  3. #3
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, should've mentioned. I tried that too .... still didn't work. I think I must be doing something dumb!

    Oh, and thanks for pointing out the spelling. I don't think I typed that in the code, but I can't remember. I'm running on caffeine this morning!

  4. #4
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    give us a link or some code, i might be able to locate the problem ?
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  5. #5
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's weird! I'm SURE that's what I did but it works now I've copied and pasted your line there. Tsk! I must've used the English spelling of colour! I'm so stupid in the mornings!

    Thanks a lot redux.

  6. #6
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Coincidentally, that CSS won't show up in DW. Which is a bit crap! Mozi's happy though, so so am I.

  7. #7
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup...never EVER trust dreamweaver's built-in preview (although it's interesting that often DW won't give you an easy way of implementing some code, but will nevertheless display it properly when it shows it in the layout window (case in point: disabled="disabled" attribute for form elements...there's no tickbox or such thing in the properties palette, nevertheless DW knows what it is)
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  8. #8
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Indeed. I always check independantly in IE and Mozi. I think what screwed me up originally was spelling colour right! A school boy error! Pesky American spellings!

    DW's pretty good on the whole (and I love the new MX feature when you're hand coding that second-guesses what code you're after .... normally that kind of feature really annoys my but they've done it well!)


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
  •