Ask Experts Questions for FREE Help !
Ask
    eruckus's Avatar
    eruckus Posts: 6, Reputation: 1
    New Member
     
    #1

    Jun 20, 2008, 08:34 PM
    Background attachment issues w/Firefox
    Hey everyone.

    Im trying to break into designing without tables, but I'm running into this problem. I want to make a background in a div fixed, but whenever I add

    Code:
    background-attachment:fixed;
    The background changes position while viewing the page in Firefox. Everything seems to be working fine in IE (using ie6) which is real strange... ive never had things work perfectly in IE and have a problem with Firefox before.

    Anyone have any ideas? Many thanks in advance!

    Here is the source for the css

    Code:
    body {
    	margin:0px;
    	padding:0px;
    	height:100%;}
    
    body, p, div, span {
    	font-family:verdana;
    	font-size:10pt;
    	color:#333346; }
    
    A:link { font-weight:bold; text-decoration: underline; color: #333346 }
    A:visited { font-weight:bold; text-decoration: underline; color: #333346 }
    A:hover { font-weight:bold; text-decoration: underline; color: #4784c7 }
    
    .main_box {
    	position:relative;
    	top: 50%;
    	left: 50%;
    	height:550px;
    	width:818px;
    	margin:-275px 0px 0px -409px; }
    
    .top {
    	background-image:url('../img/bg_boxtop.png');
    	height:16px; }
    
    .mid {
    	background-image:url('../img/bg_boxmid.png'); }
    
    .bottom {
    	background-image:url('../img/bg_boxbottom.png');
    	height:23px; }
    
    .header {
    	height:148px;
    	padding-left:10px; }
    
    .content {
    	height:100%;
    	position:relative;
    	padding:10px 10px 0px 10px; }
    
    .nav {
    	width:140px; }
    
    .mca_home {
    	position:absolute;
    	top:10px;
    	left:150px;
    	width:649px;
    	height:353px;
    	padding:6px 0px 2px 10px;
    	overflow:auto;
    
    	background-image:url('../img/content_home_bg.png');
    	background-repeat:no-repeat; }
    And here's the code for the page

    Code:
    <html><head>
    <title></title>
    
    <LINK REL="stylesheet" HREF="./inc/style_main2.inc.css" TYPE="text/css">
    
    </head><body>
    
    <div class="main_box">
    
    <!-- START HEADER -->
    
    	<div class="top"></div>
    
    	<div class="mid" style="height:148">
    
    		<div class="header" align="center">HEADER<br><br>BACKGROUND FIXED</div>
    
    	</div>
    
    <!-- END HEADER / START NAVIGATION -->
    
    	<div class="mid"  style="height:363">
    
    		<div class="content">
    
    			<div class="nav">
    
    				<div class="nav"><img src="img/nav_homea.png" name="home" height="28" width="140" border="0"></a></div>
    				<div class="nav"><img src="img/nav_ar2.png" name="ar2" height="28" width="140" border="0"></a></div>
    				<div class="nav"><img src="img/nav_ar3.png" name="ar3" height="28" width="140" border="0"></a></div>
    				<div class="nav"><img src="img/nav_ar4.png" name="ar4" height="28" width="140" border="0"></a></div>
    
    			</div>
    
    			<div class="mca_home" style="background-attachment:fixed;">CONTENT AREA<BR><BR>SOME COOL WORDS...WORDS CAN BE FUN!</div>
    
    		</div>
    
    	</div>
    
    <!-- END MAIN CONTENT AREA / START FOOTER -->
    
    	<div class="bottom"></div>
    
    <!-- END FOOTER -->
    
    </div>
    
    </body></html>
    You can check it out live with the background fixed here to see what I'm talking about.
    YOU MUST USE FIREFOX TO SEE WHAT IM TALKING ABOUT, EVERYTHING WILL LOOK FINE IF YOU ARE USING IE
    crigby's Avatar
    crigby Posts: 4,343, Reputation: 107
    Outdoor Power Equipment Expert
     
    #2

    Sep 11, 2008, 05:47 PM
    Hi,
    If I may ask, why are you declaring it inline and externally. That will give mixed results. Seems you are leaving a lot of style in the document and not in the stylesheet. By that I meen that you declare some in both places and some only where you are used to the syntax. I realize that CSS and HTML have greatly different ones. It might be instructive to play with one or both of the good free template sites, one has some bad Zip files.

    Download Our CSS Templates For Free - Free CSS Templates for your website design

    Free CSS templates - Download Free CSS Templates

    And see what others have to offer in the way of ideas. BTW, you do not need to define your anchors(links) with the underline style as browsers will unless told not to in their preferences and no declaration will change that. (I like to use none to remove it with hover and to change the background color to the link!)
    Peace,
    crigby

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Wage Attachment [ 1 Answers ]

If you work in a different state than where your garnishment was ordered, which state law do they use? For example, we live in Maryland but my husband works in Delaware. The attachment laws are different... Maryland is 25% but Delaware is 15%... what should they use??

Firefox Issues [ 1 Answers ]

I had to get rid of firfox because of a problem I can not figure out. I keep getting this message when trying to use Firefox. The proxy server is refusing connections. Does anybody know how to remedy this?? Thank you in advance. Joe

Forward as attachment [ 3 Answers ]

Is it still possible to forward a single email as an attachment using Microsoft Office 2003? I've recently started using BlueSecurity.com and I frequently need forward a single piece of spam to them but I can't find the forward as attachment option. If I select two or more emails they will send...

Attachment [ 1 Answers ]

I was asked to attach the following to my state income tax return: "Form W-2s, Form 1099s, and statements from pass-through entities showing state income tax withheld". On my 1099-misc, there is only a number in box# 7, and there is no state income tax withheld, so I don't have to attach 1099-misc?...


View more questions Search