Jump to content

nowrap and IE


wizardts

Recommended Posts

I have been struggling with this Calendar page for some time: http://tiny.cc/calendar17

 

The problem is with IE (sigh). The event titles break into vertical lines of single words when viewed in most/some IEs, including 8.

 

Just

Like

This

 

the developer used: nowrap="nowrap"

 

To fix it, I removed and added white-space: nowrap to the text in CSS:

 

    .calnk a {

        text-decoration:none;

        color:#000000;

        border-bottom:1px dotted #000000;

        white-space: nowrap;

        }

 

 

Which works, but the fix causes the rollover text to go nowrap as well. If I remove white-space: nowrap; from the CSS it all gets better but the titles are back to stupid.

 

I tried deleting the nowrap for a new class:

 

.calnka a {

        text-decoration:none;

        color:#000000;

        border-bottom:1px dotted #000000;

        }

 

But couldn't get it to work in this string (my attempts not shown):

 

$details = '<br />*<span class="calnk" {white-space:nowrap}.><a href="'.$linky.'" style="'.$style.'">' . $event->event_title . '<span style="'.$style.'">' . $header_details . '' . $event->event_desc . '</span></a></span>';

 

 

What I need is for the event desc to go back to a wrap once the title is used. Or even better a php fix that lets the CSS go back the way it was.

 

In case it helps, this is in the CSS as well:

 

    .event-title-break {

        width:96%;

        margin-left:2%;

        margin-right:2%;

        margin-top:5px;

        margin-bottom:5px;

        text-align:center;

        height:1px;

        background-color:#000000;

    }

    .event-content-break {

        width:96%;

        margin-left:2%;

        margin-right:2%;

        margin-top:5px;

        margin-bottom:5px;

        height:1px;

        background-color:#000000;

    }

 

 

Thanks I am not skilled, obviously, but willing to slug it out.

Link to comment
Share on other sites

Are your rollovers CSS rollovers, or javascript rollovers? If they are css, you want this:

 

.calnk
{
  white-space: nowrap; // you already figured out this
} 

.calnk:hover // this is for the hover effect
{
  white-space: normal; // this will remove the no-wrap when the element is hovered over
}

Link to comment
Share on other sites

Thank you so much, that worked. The side effect in IE is that the event titles revert to one line per word (weird vertical stack) when you do the rollover. When the cursor is elsewhere, the titles look as they should. This is better than before, but still looks and acts weird. http://tiny.cc/calendar17

 

The popup window is Javascript but what is at issue here seems to be in the CSS/php.

 

Here is some of the CSS and the php string that seems to control this.

 

    .calnk a:hover {

        background-position:0 0;

        text-decoration:none; 

        color:#000000;

        border-bottom:1px dotted #000000;

        white-space: normal;

        }

    .calnk a:visited {

        text-decoration:none;

        color:#000000;

        border-bottom:1px dotted #000000;

        }

    .calnk a {

        text-decoration:none;

        color:#000000;

        border-bottom:1px dotted #000000;

        white-space: nowrap;

        }

  }

    span.event {

        font-size:0.95em;

      }

 

could this be fixed here? With a new class?

 

$details = '<br />*,<span class="calnk"><a href="'.$linky.'" style="'.$style.'">' . $event->event_title . '<span style="'.$style.'">' . $header_details . '' . $event->event_desc . '</span></a></span>';

 

 

 

Link to comment
Share on other sites

I don't get it - I thought that's what you asked for!

 

To fix it, I removed and added white-space: nowrap to the text in CSS:

 

...

 

Which works, but the fix causes the rollover text to go nowrap as well.

 

This made it sound like you wanted the rollover text to wrap (not nowrap). But it appears that you didn't mean this. What are you looking for?

Link to comment
Share on other sites

I think the problem is the developer made the event titles (headlines) and text the same class/style. So a nowrap that makes the headlines go wide (not break oddly) also made the text not wrap (as in string out across the page).

 

I managed to fix it, although now when you use the rollover the event titles (headlines) below revert to the weird breaks.

 

Hard to explain, but thanks your fix led me to a mostly satisfactory solution.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.