2013-07-09 34 views
1

我做了一个导航栏,当我缩小它移动(最后消失)。我怎样才能阻止呢?这里的导航栏:(和股票是不是也工作)http://tinkatips.hol.es/testmap.html缩小并在

我试着通过CSS的定位,但它不工作:http://www.w3schools.com/cssref/playit.asp?filename=playcss_position

如何解决它,所以它不当我缩小时移动?

下面是导航栏和代码的代码。 (和图像映射)

<style type="text/css"> 

.topticker { 
     background-repeat:no-repeat; 
    background-position: top; 
    height: 150px; 
    font-family:Arial, Helvetica, sans-serif; 
    font-size:20px; 
    color:#FFFFFF; 


} 

.realnewsbg { 
     background-image: url(http://tinkatips.hol.es/Navbar.png); 
width: 1000px; 
height: 122px; 
    float:left; 
     margin-top:-130px; 
    margin-left:120px; 
    text-align:center; 
z-index: -1; 
} 


.realnews { 
background-image: url(http://deltaflow.com/themes/deltaflow/images/pixel_transparent.gif); 
width: 1000px; 
height: 122px; 
    float:left; 
     margin-top:-40px; 
    margin-left:220px; 
    text-align:left; 
z-index: -1; 

} 


</style> 

<style type="text/css"> 

#ajaxticker1{ 
width: 1000px; 
height: 100px; 
z-index: 99999; 
} 

#ajaxticker1 div{ /*IE6 bug fix when text is bold and fade effect (alpha filter) is enabled. Style inner DIV with same color as outer DIV*/ 
} 

.someclass{ //class to apply to your scroller(s) if desired 
} 

</style> 

<script src="ajaxticker.js" type="text/javascript"> 

/*********************************************** 
* Ajax Ticker script (txt file source)- © Dynamic Drive (www.dynamicdrive.com) 
* This notice MUST stay intact for legal use 
* Visit http://www.dynamicdrive.com/ for this script and 100s more. 
***********************************************/ 

</script> 

<center><div class="topbackground"> 
<img id="Image-Maps_3201307070909053" src="http://deltaflow.com/themes/deltaflow/images/pixel_transparent.gif" usemap="#Image-Maps_3201307070909053" border="0" width="1000" height="122" alt="" /> 
<map id="_Image-Maps_3201307070909053" name="Image-Maps_3201307070909053"> 
<area shape="rect" coords="19,6,196,66" href="http://www.google.com" alt="" title="" /> 
<area shape="rect" coords="232,7,409,67" href="http://www.google.com" alt="" title="" /> 
<area shape="rect" coords="438,5,615,65" href="http://www.twitter.com/" alt="" title="" /> 
<area shape="rect" coords="651,7,828,67" href="" alt="Coming Soon !" title="Coming Soon !" /> 
<area shape="rect" coords="866,0,984,56" href="" alt="" title="" /> 
<area shape="rect" coords="998,120,1000,122" href="http://www.image-maps.com/index.php?aff=mapped_users_3201307070909053" alt="Image Map" title="Image Map" /> 

<div class="realnewsbg"> 
</div> 
<div class="realnews"><script type="text/javascript"> 
var xmlfile="tickercontent.txt" //path to ticker txt file on your server. 
//ajax_ticker(xmlfile, divId, divClass, delay, optionalfadeornot) 
new ajax_ticker(xmlfile, "ajaxticker1", "someclass", [3500], "fade") 
</script></div></div> 
<div class="header"></div> 
</div> 
+0

请显示栏的HTML和CSS。 –

+0

添加了css的股票代码和html –

回答

0

导览列不动:你的div .realnewsbg.realnews是。

删除每个div上的float:left属性,并删除margin-left.realnewsbg以使其正常工作。

+0

谢谢!现在工作。 –

+0

@DansGingerson不要忘记在'.realnewsbg'上也删除'margin-left' – Bigood

+0

我也是这么做的。 –