Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

problem with the css overflow: hidden property

Posted on 2010-09-06
15
Medium Priority
?
701 Views
Last Modified: 2013-11-19
hi EE,
I have the following html segment to illustrate my problem.  
If you look at this html you'll see a class called 'OutboundDaySliderContainer' which uses the overflow: hidden css property.  This causes the orange graphic (included in the markup) to display incorrectly.  The problem being is that the full width is cut off.  If you comment out the overflow: hidden property you'll see how the graphic should display.

is it possible to make the 'UrgencyMessage.gif' display correctly without removing the overflow: hidden property?  i.e. is there anything in jquery that can be done or some sort of z-index setting?  i've experimented but my attempts have failed so far.

many thanks,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <style type="text/css">
        
        .UrgencyMessage
        {
            display: none;
        }
        .day ul li.alt-lowest a
        {
            background: none repeat scroll 0 0 #FFFFFF;
            border: 1px solid #FF7B00;
        }
        .UrgencyMessage
        {
            background: url("http://www.jamesradford.net/UrgencyMessage.gif") no-repeat scroll 0 0 transparent;
            color: #FFFFFF;
            display: none;
            font-weight: bold;
            height: 70px;
            margin-left: 80px;
            margin-top: 53px;
            padding-top: 12px;
            position: absolute;
            width: 200px;
            z-index: 1;
        }
        .day ul li, .day ul li a
        {
            min-height: 62px;
        }
        .day ul li
        {
            display: block;
            list-style: none outside none;
            margin-bottom: 3px;
            padding: 0;
        }
        .tab-content .day
        {
            color: #333333;
            display: block;
            float: left;
            margin: 0 3px 5px 0;
            text-align: center;
            width: 81px;
        }
        .OutboundDaySlider
        {
            left: -84px;
            position: relative;
            width: 420px;
        }
        .OutboundDaySliderContainer
        {
            overflow: hidden;
            position: relative;
            width: 252px;
        }
        .day ul li.alt-lowest a
        {
            background: none repeat scroll 0 0 #FFFFFF;
            border: 1px solid #FF7B00;
        }
        .day ul li.alt-lowest a
        {
            background: none repeat scroll 0 0 #FFFFFF;
            border: 1px solid #FF7B00;
        }
        .day ul li, .day ul li a
        {
            min-height: 62px;
        }
        .day ul li, .day ul li a
        {
            min-height: 62px;
        }
        .day ul li a
        {
            color: #333333;
            display: block;
            padding: 25px 0 5px;
            position: relative;
        }
    </style>
</head>
<body>
    <div id="wrapper">
        <div id="pageWrap">
            <div id="">
                <div class="calendarTabs">
                    <div id="" class="tab-content">
                        <div class="tab-content-ReturnJourney contain">
                            <div id='' class='journey3Day first'>
                                <div id='' class="calendarView contain">
                                    <div class="OutboundDaySliderContainer">
                                        <div class="OutboundDaySlider">
                                            <div class="day">
                                            </div>
                                            <div class="day">
                                                <ul>
                                                    <li id='' class='alt-lowest firstRowOut '>
                                                        <div class="UrgencyMessage" id="UrgencyMessage2426400">
                                                            <div class="UrgencyMessageInner">
                                                                test
                                                            </div>
                                                        </div>
                                                        <a id='' href="#" class=' '><span class="priceSmaller"></span><span class="time">xxx
                                                        </span><span class="time">xxx </span></a></li>
                                                    <li id='' class='alt-lowest firstRowOut '>
                                                        <div class="UrgencyMessage" id="UrgencyMessage2420107">
                                                            <div class="UrgencyMessageInner">
                                                                test
                                                            </div>
                                                        </div>
                                                        <a id='' href="#" class=' '><span class="priceSmaller"></span><span class="time">xxx
                                                        </span><span class="time">xxx </span></a></li>
                                                </ul>
                                            </div>
                                            <div class="day">
                                                <ul>
                                                    <li id='' class='alt-lowest row1 '>
                                                        <div class="UrgencyMessage" id="UrgencyMessage2426401" style="display: block">
                                                            <div class="UrgencyMessageInner">
                                                                test
                                                            </div>
                                                        </div>
                                                        <a id='' href="#" class=' '><span class="priceSmaller"></span><span class="time">xxx
                                                        </span><span class="time">xxx </span></a></li>
                                                    <li id='' class='alt-lowest row1 '>
                                                        <div class="UrgencyMessage" id="UrgencyMessage2420108">
                                                            <div class="UrgencyMessageInner">
                                                                test
                                                            </div>
                                                        </div>
                                                        <a id='' href="#" class=' '><span class="priceSmaller"></span><span class="time">xxx
                                                        </span><span class="time">xxx </span></a></li>
                                                </ul>
                                            </div>
                                            <div class="day">
                                                <ul>
                                                    <li id='' class='alt-lowest lastRowOut '>
                                                        <div class="UrgencyMessage" id="UrgencyMessage2426402">
                                                            <div class="UrgencyMessageInner">
                                                                test
                                                            </div>
                                                        </div>
                                                        <a id='' href="#" class=' '><span class="priceSmaller">xxx</span> <span class="time">
                                                            xxx </span><span class="time">XXX </span></a></li>
                                                    <li id='' class='alternative lastRowOut '>
                                                        <div class="UrgencyMessage" id="UrgencyMessage2420109">
                                                            <div class="UrgencyMessageInner">
                                                                test
                                                            </div>
                                                        </div>
                                                        <a id='' href="#" class=' '><span class="priceSmaller">xxx</span> <span class="time">
                                                            xxx </span><span class="time">xxx </span></a></li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
</body>
</html>

Open in new window

0
Comment
Question by:jimbona27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 3
  • 2
  • +1
15 Comments
 
LVL 30

Expert Comment

by:Mark Steggles
ID: 33614273
Hello,

No, there is nothing that can be done if you want to keep overflow hidden and the image inside that div. You would have to move that img outside of that either in the markup or with jquery

Thanks
0
 
LVL 13

Expert Comment

by:qwerty021600
ID: 33615126
u can remove width instead of overflow:hidden; property..
0
 
LVL 13

Expert Comment

by:qwerty021600
ID: 33615131
Or increase the width of OutboundDaySliderContainer to 400px;
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:jimbona27
ID: 33615294
Ok thanks. Can I have an example where it works using JavaScript? As the position and widths need to stay the same.
Thank you
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 33615931
Or you can scale down the image by specifying its width and height.
0
 

Author Comment

by:jimbona27
ID: 33615937
to fit the image within the panel that's causing the problem it would have to be too small.

can I have a simple example using javascript..?

many thanks,
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 33615949
0
 

Author Comment

by:jimbona27
ID: 33616114
is it possible to have a simple example as I'm not sure what your suggesting..
thanks,
0
 

Author Comment

by:jimbona27
ID: 33616633
any ideas?
Thanks
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 33616671
the link i had posted has simplest of example, did you tried it?
more examples could be seen at
http://css-tricks.com/perfect-full-page-background-image/
http://css-tricks.com/how-to-resizeable-background-image/
0
 

Author Comment

by:jimbona27
ID: 33617593
are you saying this can be resolved by putting the background image within the javascript?
0
 

Author Comment

by:jimbona27
ID: 33617611
i need an example as I dont see how this works for my situation please?
Thanks
0
 

Author Comment

by:jimbona27
ID: 33617659
are you saying that I can just write the div content into a javascript string and then display that on hover which will not experience the same problem with the overflow: hidden?

Thanks,
0
 

Author Comment

by:jimbona27
ID: 33619113
can you provide an example please for my situation?
many thanks,
0
 
LVL 30

Accepted Solution

by:
Mark Steggles earned 2000 total points
ID: 33622145
Hey,

Sorry for the late reply.

You would have to move the urgency message stuff outside of this div <div class="OutboundDaySliderContainer">

For instance, you could position your urgency message stuff, like this:

<div id='' class="calendarView contain" style="position:relative">
<div class="OutboundDaySliderContainer"></div>
<div class="UrgencyMessage" id="UrgencyMessage2420108">
 <div class="UrgencyMessageInner">
   test
  </div>
 </div>
</div>


.UrgencyMessage
        {
            background: url("http://www.jamesradford.net/UrgencyMessage.gif") no-repeat scroll 0 0 transparent;
            color: #FFFFFF;
            display: none;
            font-weight: bold;
            height: 70px;
            margin-left: 80px;
            margin-top: 53px;
            padding-top: 12px;
            position: absolute;
top:20px;
right:20px;
            width: 200px;
            z-index: 1;
        }

play with the right and top values above


Hope this helps

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question