SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS selectors acting differently on identical pages.

    Hello,

    I am building a site, and having a CSS problem that for the life of me I can't figure out. These two pages are identical with the exception of the photos (the images are all the same size and aspect ratio). Any help would be much appreciated!

    This is how both pages are suppose to look:
    http://www.thesurrealstudio.com/ligh...ines/left_side

    But for some reason this page is displaying the same CSS and same HTML structure like this:
    http://www.thesurrealstudio.com/ligh...nes/right_side


    Like I said, any help would be much appreciated! What am I missing?

  2. #2
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,584
    Mentioned
    65 Post(s)
    Tagged
    2 Thread(s)
    In the left_side.htm, you are arranging 3 rows with 4 images each, in the right_side.htm it looks like you are calling 2 rows of 6 images each (#gallery_6) which are trying to fit as best they can into the 4x3 layout.

    I think I got that straight. In any event, that's the short answer. Does that help? Or do you want to modify the layout?

  3. #3
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply ronpat. Everything is actually static right now. And I am not actually calling rows, every photo is in one wrapper called galler_wrapper. I am using nth-child (4n+4) to target every 4th element to take out margin-right so that they all fall in line. This is another page that works right based on the same css and HTML:
    http://www.thesurrealstudio.com/ligh...nines/studio_9

    so stll not sure what is going on!

  4. #4
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    got it, one of the pictures was not the correct size. guess that was throwing everything off

  5. #5
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,584
    Mentioned
    65 Post(s)
    Tagged
    2 Thread(s)
    Glad you found the problem. Thanks for the helpful follow-up.

    Best2U going forward.


Tags for this Thread

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
  •