+ Reply to Thread
Results 1 to 7 of 7

Thread: border padding problem

  1. #1
    ZeptOr's Avatar
    ZeptOr is offline x10 Sophmore ZeptOr is an unknown quantity at this point
    Join Date
    Sep 2005
    Posts
    221

    border padding problem

    On a specific page of my website, I have a couple of thumbnails pictures that I want a padded border around. My CSS seems to work fine in Firefox, but not in IE. The URL is here:

    http://www.alexthegood.com/main/digital.html

    My CSS that i used to put the padded border is this:

    Code:
    img.frame
    	  {
    		border: 1px #406B7C solid;
    		padding:4px;
    		}
    
    	  img.frame:hover
    	  {
    		border: 1px #406B7C solid;
    		padding:4px;
                    }
    and if you want to see my other CSS, although its messy, its here:

    http://www.alexthegood.com/main/atgStyles.css
    Last edited by ZeptOr; 12-21-2006 at 12:37 PM.

  2. #2
    Zenax's Avatar
    Zenax is offline Lord Of The Keys Zenax is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    The Brilliant United Kingdom
    Posts
    1,339

    Re: border padding problem

    I really think that you don't need the img.frame:hover CSS.

    Try Removing it and see what happens!

    Regards,
    Zenax
    Regards,
    Zenax

  3. #3
    Cubeform is offline x10 Lieutenant Cubeform is an unknown quantity at this point
    Join Date
    Aug 2006
    Location
    127.0.0.1
    Posts
    339

    Re: border padding problem

    Instead of styling the <img /> elements, you style the <a /> elements that contain them. In order to not screw up the rest of your website, you'll need to apply a class to the <a /> elements.

    Code:
    a.frame
    	  {
    		border: 1px #406B7C solid;
    		padding:4px;
                    display:block;
              }
    
    a.frame:hover
    	  {
    		border: 1px #406B7C solid;
    		padding:4px;
              }
    Note the display:block attribute that needs to be applied.

    It works in Firefox.
    Last edited by Cubeform; 12-22-2006 at 05:51 PM.
    CUBEFORM
    XHTML | CSS | PHP | JavaScript
    THIS WEEK


  4. #4
    ZeptOr's Avatar
    ZeptOr is offline x10 Sophmore ZeptOr is an unknown quantity at this point
    Join Date
    Sep 2005
    Posts
    221

    Re: border padding problem

    Thanks cubeform, that seemed to work

    btw, what program are you using in that picture?

  5. #5
    dest581 is offline x10 Lieutenant dest581 is an unknown quantity at this point
    Join Date
    Sep 2006
    Posts
    348

    Re: border padding problem

    The Web Developer toolbar HTML editor, it looks like. It's an extension for Firefox.

    Lets you edit an already existing HTML page, so you can see how changes would affect it immediately.

  6. #6
    ZeptOr's Avatar
    ZeptOr is offline x10 Sophmore ZeptOr is an unknown quantity at this point
    Join Date
    Sep 2005
    Posts
    221

    Re: border padding problem

    where do you download that? it sounds more useful than notebook

  7. #7
    Cubeform is offline x10 Lieutenant Cubeform is an unknown quantity at this point
    Join Date
    Aug 2006
    Location
    127.0.0.1
    Posts
    339

    Re: border padding problem

    I use the Web Developer extension for Firefox, and the FireBug JavaScript debugger (which also has an edit HTML feature).

    You can get FireBug 1.0b at http://getfirebug.com/ and the web developer extension at https://addons.mozilla.org/firefox/60/.
    CUBEFORM
    XHTML | CSS | PHP | JavaScript
    THIS WEEK


+ Reply to Thread

Similar Threads

  1. Very Slight Problem with my code
    By Zenax in forum Scripts & 3rd Party Apps
    Replies: 5
    Last Post: 08-29-2006, 07:17 AM
  2. CGI problem maybe?
    By boblake in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 08-24-2006, 04:15 AM
  3. Default Ads Border Suggestion
    By k12onos in forum Feedback and Suggestions
    Replies: 4
    Last Post: 07-29-2006, 06:51 AM
  4. Ad code problem!
    By Akkarin in forum Free Hosting
    Replies: 8
    Last Post: 08-29-2005, 10:39 AM
  5. Ftp Timeout problem
    By ironcross77 in forum Free Hosting
    Replies: 7
    Last Post: 04-12-2005, 08:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers