SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    CSS is almost identical, appearance is different

    On this page, http://glidingholiday.co.uk/glidingholiday.htm , you'll notice that the background image for the h2 in the two columns on the right extend to touch the border of the divs class= .half.

    Lower down the page on the left is a div called .imgBox250, which now has almost the same code as .half. The h2 has the very same css for both divs. But here the background image for the h2 doesn't reach the edges of the border, and is set further below the top border. It should also sit the same 5px below the top as in .half.

    It's usually something obvious when I make mistakes, and I'm sure you guys will find it in minutes, but I've been fiddling with things for a while and am struggling.

    (the line with option links is to variations of the home page, not variations of this page)

  2. #2
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,254
    Mentioned
    113 Post(s)
    Tagged
    1 Thread(s)
    .imgBox250 has a padding of 10px on it, which is why the h2 doesn't go all the way to the edge. (hols5.css, line 64 according to the inspect element in chrome)
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style

  3. #3
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Ah

    I've taken that out, made the div 10px wider and put the padding on the imgBox250 img itself.
    And it works.

    I used that to keep the image nicely in place and never thought of altering it. Both divs started at different widths and have almost, but not quite converged to be the same. If the client says "just a little bit wider", they will be!

    Thanks.


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
  •