Advertisement:

Author Topic: IE problems  (Read 1035 times)

Offline xpopy

  • Semi-Newbie
  • *
  • Posts: 28
IE problems
« on: December 16, 2012, 07:30:59 AM »
Hello. I am having problems with Internet Explorer, and I am not really sure what is causing it.

How I want it to look (Works in Google Chrome):



How it looks like in Internet Explorer:




As you can see, the Login and Register buttons is acting a bit weird.

This is the code for it:
Code: [Select]
<div class="wrapper">
   
            <div class="floatright" style="float: right;">
        <form id="search" style="float:right;" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
        <input id="search_text" type="text" name="search" onfocus="if (this.value == \'', $txt['search'], '...\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'', $txt['search'], '...\';" value="', $txt['search'], '..." />
        <input id="search_button" type="submit" name="submit" value="" />
        <input type="hidden" name="advanced" value="0" />';
        if (!empty($context['current_topic'])){
        echo '
        <input type="hidden" name="topic" value="', $context['current_topic'], '" />';}
        elseif (!empty($context['current_board'])){
        echo '
        <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';}
          echo '
        </form><br />';
        if(!empty($context['user']['is_guest']))
            echo'
    <ul class="hm">
    <li><a href="', $scripturl, '?action=login">', $txt['login'], '</a></li>
    <li><a href="', $scripturl, '?action=register">', $txt['register'], '</a></li>
</ul>';
else
echo'
    <ul class="hm" style="float: right">
    <li class="hm2"><span class="avatar_lu" align="absmiddle">', !empty($context['user']['avatar']['image']) ? $context['user']['avatar']['image'] : '<img src="' . $settings['images_url'] . '/avatar_default.png" alt="" />' ,'</span><a href="', $scripturl, '?action=profile"> ', $context['user']['name'], '</a></li>
    <li>', $context['current_time'], '</li>
</ul>';
echo'
</div>
            <a href="', $scripturl, '"><img src="' . $settings['images_url'] . '/logo.png" alt="' . $context['forum_name'] . '" /></a>
    </div>
</div>
<div class="wrapper">';

CSS:
Code: [Select]
.floatright
{
float: right;
}

#search
{
margin: 0;
padding: 0;
position: relative;
display: block;
}

.hm
{
padding: 0;
margin-top: 5px;
list-style: none;
float: right;
position: relative;
display: block;
}

Online Kindred

  • Support Specialist
  • SMF Master
  • *
  • Posts: 32,093
  • Gender: Male
    • wagner999 on Facebook
    • @Kindred_999 on Twitter
Re: IE problems
« Reply #1 on: December 16, 2012, 08:41:32 AM »
Why are you declaring float:right, in both the CSS and the style inline?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support forums.  Thank you.

Offline xpopy

  • Semi-Newbie
  • *
  • Posts: 28
Re: IE problems
« Reply #2 on: December 18, 2012, 03:29:02 AM »
That doesn't matter, I have tried removing just one of them at the time and it's all still the same.

Offline Gary

  • Lead Customizer
  • SMF Super Hero
  • *
  • Posts: 14,878
  • Gender: Male
  • So this is the luck of the draw...
    • @Gazmanafc on Twitter
    • The Bongo Comics Fan Forum
Re: IE problems
« Reply #3 on: December 19, 2012, 04:34:45 AM »
Give adding:

Code: [Select]
clear: right;
to the hm class a shot.
Gary M. Gadsdon
Lead Customiser
Do NOT PM me unless I say so
Look here are three little dreamers,
ready to impress everyone
Listen up, cos it's not over
Our time has just begun!

The War of the Simpsons
Bongo Comics Fan Forum


Offline xpopy

  • Semi-Newbie
  • *
  • Posts: 28
Re: IE problems
« Reply #4 on: December 19, 2012, 05:52:18 AM »
Ah thx, that made it work :)