473,320 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Floating right in IE 7

KeredDrahcir
426 256MB
I'm having an issue in IE. I want to display a banner and then put a couple of links on top of it.
This didn't work in IE6 which was being used by enough of my intended audience to make it worth checking for compatabilty. The banner was being displayed on top of the links.

I've moved the links out of the banner division and given them their own division and abso;lutley positioned it and it works fine in Firefox and IE8. In IE 7 the links are in the middle of the page although I have floated them to the right.

Could anyone suggest what I'm doing wrong?

BTW, the page is 980px wide.

Expand|Select|Wrap|Line Numbers
  1.         <div class="site_head">
  2.           <div class="site_logo">
  3.             <a href="/"><img alt="" src="/images/logo.jpg" border="0"/></a>
  4.           </div>
  5.  
  6.           <div class="site_header">
  7.               <a href="/my page1.html" style="width: 170px; padding-left: 30px;">Page 1</a>
  8.           </div>
  9.           <div class="site_header" style="margin-top: -140px;">
  10.             <a href="/my page 2.html">Page 2</a>
  11.           </div>
  12.         </div>
The CSS is:
Expand|Select|Wrap|Line Numbers
  1. .site_head {
  2.         position: absolute;
  3.         z-index: 3;
  4.         top: 0px;
  5.         padding-left: 30px;
  6.         width: 950px;
  7. }
  8.  
  9. .site_header {
  10.     margin: -180px 10px 0 0;
  11.     background:#8e6f90;
  12.     height:25px;
  13.     line-height:25px;
  14.     text-align:left;
  15.     border:none;
  16.     font-family:verdana, arial, sans-serif;
  17.     font-size:12px;
  18.     font-weight:normal;
  19.     color:#ffffff;
  20.     text-decoration:none;
  21.     border:none;
  22.     width:160px;
  23.     padding: 0 0 0 5px;    
  24.     float: right;
  25.     position: relative;
  26.     z-index: 2;
  27.     border: 1px solid #000000;
  28. }
  29.  
  30. .site_header a {
  31.     background:#8e6f90;
  32.     height:25px;
  33.     line-height:25px;
  34.     text-align:left;
  35.     border:none;
  36.     font-family:verdana, arial, sans-serif;
  37.     font-size:12px;
  38.     font-weight:normal;
  39.     color:#ffffff;
  40.     text-decoration:none;
  41.     border:none;
  42.     width:160px;
  43.     padding: 0 0 0 5px;    
  44.     float: right;
  45.     position: relative;
  46.     z-index: 2;
  47. }
  48.  
  49. .site_header a:hover {
  50.     background:#8e6f90;
  51.     height:25px;
  52.     line-height:25px;
  53.     text-align:left;
  54.     border:none;
  55.     font-family:verdana, arial, sans-serif;
  56.     font-size:12px;
  57.     font-weight:normal;
  58.     color:#ffffff;
  59.     text-decoration:underline;
  60.     border:none;
  61.     width:185px;
  62.     padding: 0 0 0 30px;    
  63.     float: right;
  64.     position: relative;
  65.     z-index: 2;
  66. }
  67.  
  68. .site_logo {
  69.         position: absolute:
  70.         z-index: 2;
  71. }
Am I missing something here?
Mar 25 '11 #1

✓ answered by KeredDrahcir

I sorted it out finally by adding clear: both into each or most of the styles I detailed above. It works in IE6, 7 and 8 but not IE 8 - compatability mode but that's IE for you.

2 2174
Do you have a link to the page so we can see what you're trying to achieve?
Mar 26 '11 #2
KeredDrahcir
426 256MB
I sorted it out finally by adding clear: both into each or most of the styles I detailed above. It works in IE6, 7 and 8 but not IE 8 - compatability mode but that's IE for you.
Apr 13 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: George Hester | last post by:
At the time this suggestion was made I didn't have the wherewithall to even attempt it. But over time I learned enough to make a stab at it. Let just say the foating DIV had to provide the same...
4
by: Dave | last post by:
Hi folks, I am trying to develop a routine that will handle sphere-sphere and sphere-triangle collisions and interactions. My aim is to develop a quake style collision engine where a player can...
12
by: meltedown | last post by:
I would like the floating divs to float and then the header to come after them , on the left. That's what I thought clearing the floats was for, but in this example, the header is to the right of...
687
by: cody | last post by:
no this is no trollposting and please don't get it wrong but iam very curious why people still use C instead of other languages especially C++. i heard people say C++ is slower than C but i can't...
1
by: Lee K. Seitz | last post by:
I created this page (http://home.hiwaay.net/~lkseitz/comics/newu/publishing.shtml; CSS at http://home.hiwaay.net/~lkseitz/comics/newu/newu.css) while looking at it in Firefox 1.05 (Win 9x) and it...
10
by: Bryan Parkoff | last post by:
The guideline says to use %f in printf() function using the keyword float and double. For example float a = 1.2345; double b = 5.166666667; printf("%.2f\n %f\n", a, b);
5
by: Oliver Block | last post by:
Hello everybody, I wonder why a <span style="float:right">some text</span> might be displayed out of a surrounding div element. It is shifted to the next line. I thougt it is supposed to...
2
by: Eric Lindsay | last post by:
I hope someone can help, before I start thinking tables have a lot of merit after all. I am trying to achieve a two column layout, with source code div order main content, right side navigation,...
5
by: jemcgui | last post by:
I've been building a site that has a quirk in it. It will display just as intended in IE but not firefox. The left "nav" div which is floating left will be forced down to the bottom of the page. The...
9
by: ssubbarayan | last post by:
Hi all, I am trying a program to convert floating point values to a byte array and printing the same to the screen.The idea behind this is we already have an existing function which can do byte...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.