In the realm of website design, the IE7 display

I am currently facing an issue with my gallery buttons when using IE7. The CSS code I have for the buttons is causing them to shift to the right hand side of the gallery, even though they work fine in other browsers. Here is the code:

.prv_button{
    float:left;
height:227px;
width:15px;
position:absolute;
display:block;
overflow: hidden;

}

.prv_button a{
background-image:url(../images/gal_prv.jpg);
background-repeat:no-repeat;
height:227px;
width:15px;
display:block;
position:relative;
overflow: hidden;
}

.nxt_button{
height:227px;
width:15px;
float:left;
position:absolute;
display:block;
overflow: hidden;
left:432px;
}

.nxt_button a{
background-image:url(../images/gal_nxt.jpg);
background-repeat:no-repeat;
height:227px;
overflow: hidden;
width:15px;
display:block;
position:relative;
}

If you need more information or have any suggestions on how to fix this issue, please let me know.

Thank you.

Answer №1

Understand what you are trying to achieve might be a bit unclear, but it seems like you can accomplish this without using floats, absolute positioning, or background images. Assuming that .outer_gwrap has a style of display:inline-block;

CSS:

.prv_button{
    display:inline-block;
    vertical-align:top;
    width:15px;
}

.prv_button a{
    vertical-align:top;
}
.prv_button img{
    border-width:0px;
}
.nxt_button{
    display:inline-block;
    vertical-align:top;
    width:15px;
}
.nxt_button a{
    vertical-align:top;
}
.nxt_button img{
    border-width:0px;
}
.outer_gwrap{
    display:inline-block;
    width:834px;
    zoom: 1;
    *display: inline;
}

HTML:

<div class="gallery" >
            <span class="prv_button">
                <a href=""><img src="../images/gal_prv.jpg"></a>
            </span>
            <div class="outer_gwrap">
                <ul class="inner_gwrap">
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                </ul>
                <ul class="inner_gwrap">
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                    <li><a target="_blank" href=""><img border="0" src=""></a></li>
                </ul>
            </div>
            <span class="nxt_button">
                <a href=""><img src="../images/gal_nxt.jpg"></a>
            </span>
        </div>

Answer №2

To ensure proper positioning in IE7, I implemented a separate stylesheet specifically for that browser. This way, any adjustments made for IE did not affect the positioning in other browsers.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is there a way to delete a stylesheet if I only have limited information about the url?

I am attempting to dynamically remove a CSS stylesheet using JavaScript or jQuery. I am aware that the target stylesheet is located within the 'head' element and includes the text 'civicrm.css', however, I do not possess the full URL o ...

What is the best way to achieve full width for text on large screens in Bootstrap 3 while eliminating right margins?

I've been attempting to create a full-width text display on large screens using Bootstrap, but despite utilizing container-fluid and trying solutions from StackOverflow that should enable full width, there still remains whitespace at the right side of ...

Instead of only one menu icon, now there are three menu icons displayed on the screen. (Additionally, two more divs containing

When visiting on a smartphone browser, you may notice that instead of one menu icon, three icons appear. Upon inspecting the elements, you will find that there are three div's that look like this: <div class="responsive-menu-icon">&l ...

Is it possible to avoid widows in CSS without the need for extra HTML elements?

I have a snippet of text that is controlled within a Content Management System. The CMS restricts the use of HTML or special characters such as &nbsp; or <span>. Despite my attempts to adjust margins and padding, I cannot achieve the desired out ...

Ideas for displaying or hiding columns, organizing rows, and keeping headers fixed in a vast data table using jQuery

My data table is massive, filled with an abundance of information. Firstly, I am looking to implement show/hide columns functionality. However, as the number of columns exceeds 10-12, the performance significantly decreases. To address this issue, I have ...

"Facing an issue with Google Chrome not refreshing the latest options in an HTML select dropdown list

Having trouble creating an offline HTML file that incorporates jQuery for the script. The page features a state select menu followed by a second menu for counties. When a state is selected, only the corresponding counties should display while others remai ...

A plug-in for TinyMCE that allows users to adjust column widths within a table

We utilize TinyMCE in our content management system (CMS), and our users have expressed interest in being able to adjust the width of a column within a table. While HTML technically does not recognize columns, the Moodle editor HTMLAREA includes a plugin t ...

Require checkboxes in AngularJS forms

Currently, I have a form that requires users to provide answers by selecting checkboxes. There are multiple checkboxes available, and AngularJS is being utilized for validation purposes. One essential validation rule is to ensure that all required fields a ...

Is it just me, or does the float left - float right combination only break in IE

Oh dear, it seems like IE9 is causing some trouble again. The other "capable" browsers handle this HTML just fine, including IE8 which isn't even that great. Here's the code snippet: <div class="contact_info_city" id="contact_info_cityX"> ...

Utilizing PHP to send emails via an HTML form

I spent all day attempting to send an email from my HTML contact form using PHP, but I'm struggling as a beginner. When I uploaded the form to free web hosting, I received a "success!" message upon submission, yet no actual email was sent. Any assist ...

Replace the default focus state using CSS or resetting it to a custom style

I'm looking for a solution similar to a CSS reset, but specifically for the :focus state. If such a thing doesn't exist yet, I'm interested in learning about the possible properties that can be reset or overridden in order to create a new :f ...

"Transitioning from jQuery to Vanilla Javascript: Mastering Scroll Animations

I'm seeking guidance on how to convert this jQuery code into pure Javascript. $('.revealedBox').each(function() { if ($(window).scrollTop() + $(window).height() > $(this).offset().top + $(this).outerHeight()) { $(this).addCla ...

Exploring Javascript parameters with the power of jquery

Is it possible to pass a parameter from PHP into a JavaScript function within HTML? I am currently facing an issue where my code crashes when it reaches a certain condition. This is the code snippet causing the problem: $str="<input type='submit&a ...

The checkbox is displayed as selected after being clicked in conjunction with another checkbox

In the tree structure, there are checkboxes that behave strangely when clicked. I have already read a similar discussion here. The problem I am encountering is that when I click on an item, it gets checked but the console does not show it as checked immed ...

Having trouble with your website div not appearing correctly on Firefox?

I'm facing an issue with the display of a website (found here). The elements inside the div with the class name of .index_container are not appearing correctly in Firefox. Despite being present, they remain invisible. I've attempted to resolve th ...

The CSS3 Transform feature kicks in only after the window is resized in Mozilla Firefox

I have created a pure CSS3 parallax webpage by following the method outlined by Keith Clark and using a sample made by Carl Henderson (I can't provide a direct link to his codepen due to my lack of reputation). You can find the code in the main page, ...

Enable hovering only on the actual content within the box, not on the empty space

Currently, I am working on creating a navigation bar using flexbox. Everything seems to be functioning correctly except for one issue: when I hover over the space between my logo and the navigation links, it changes the color of my logo to the hover state ...

What is the best way to generate a search link after a user has chosen their search criteria on a webpage?

In my search.html file, I have set up a form where users can input their search criteria and click the search button to find information within a database of 1000 records. The HTML part is complete, but I am unsure how to create the action link for the for ...

CSS techniques for positioning a header image

I'm having an issue with using a banner I created in CS6 Illustrator as a header on my website. Despite setting it as the background, positioned at the top and set to "no-repeat", it keeps appearing at the bottom of the header area with around 300px o ...

How to Build a Custom Toolbar with Left and Right Aligned Elements using React.js and Material UI

Struggling with updating the toolbar on my website. Wanting the site name and logo on the left side, while login/sign-up buttons fixed to the right. Logo and title are in place, but can't get buttons to stay on right margin. Here's the code: func ...