Results 1 to 6 of 6

Thread: This is one oddest problems I've seen in CSS.. h2s and spans

  1. #1
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default This is one oddest problems I've seen in CSS.. h2s and spans

    On a certain page http://cyanideperfection.net/gallery you will see that the first link has the text floating just on top the way I want while the other is off to the side looking ugly. They are styled as H2s but if I say the following it turns out like the ugly one
    Code:
    <h2 class="left">Exhibit</h2>
    Whereas if I say this:
    Code:
    <h2 class="left">Exhibit</span>
    It looks normal the way I want it to.

    And if I actually style them as spans and close them correctly they look even crazier. How in the world could this be happening? I've never seen anything like this... it's really odd.

    EDIT: I should mention that this problem is in FF, I know IE is messed up also but I'm getting to that.

  2. #2
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    its cuz you haven't closed the h2 tag...
    try this instead...
    Code:
    <div id="gallery">
    <div class="image"><h2 class="left">Landscapes</h2><a href="landscape/index.html"><img src="splash/sunset_crop.jpg" class="left"></a></div>
    <div class="image"><h2 class="left">Exhibits</h2><a href="exhibit/index.html"><img src="splash/exhibit.jpg" class="right"></a></div>
    
    </div>
    I don't know if thats what you want but it will help the overlap

  3. #3
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No thats the problem! If you actually end the header2 tag... it puts off to the side like the exhibit! thats why I said it was odd.

    In order to make it the way I want, I have to style it as a h2 and use an </span>. I know there is some way this can be done properly but I'm just confused.

  4. #4
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    woops
    i messed up... sorry i changed the class for exhibit
    Code:
    <div id="gallery">
    <div class="image"><h2 class="left">Landscapes</h2><a href="landscape/index.html"><img src="splash/sunset_crop.jpg" class="left"></a></div>
    <div class="image"><h2 class="right">Exhibits</h2><a href="exhibit/index.html"><img src="splash/exhibit.jpg" class="right"></a></div>
    
    </div>
    Try I think your only trying to get rid of the top one overlapping is that correct???

  5. #5
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No, I want exhibit to look like Landscape.

  6. #6
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm, odd. If I place the </h2> tag at the end of the line right before the </div> it works fine.

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
  •