CSS - Refresh Not Reloading Linked Css File.
Not sure if this is the right place to ask this but it is sort of a CSS problem.
When I change my linked CSS file and refresh the page I'm working on in the browser, the CSS doesn't automatically get refreshed so the changes I've made don't show up. I can force a refresh by using ctrl+F5 but obviously that's no use for a live setting. Has anyone else come across this problem and if so, do you know of a solution? Is there a way to force the browser to refresh the style sheet? Thanks. Similar TutorialsHello Everyboy, I have a problem with image reloading. In my page, i am using font resize tool. When i click over the icon of font resize, i am changing the stylesheet of the page. But i dont know why, the images in the navbar and header are all reloading. It shouldn't happen. This is happened only in IE when i set settings as 'every visit to the page'. So if anybody know the solution, can you please reply me. Thanks in advance. Edit/Delete Message Hi, I've just spent all night re-building my site as HTML and CSS, since my Joomla site was suffering from a slight case of death due to "hosting issues" during a plaform migration I've got the site looking and working sweet, apart from one small thing. In Netscape 8.1 which I currently have installed, it loads the content in the right of the design right down at the bottom of the screen. When you refresh the browser it jumps back to the top, and it works perfectly for all links !!! It displays superbly in IE all of the time. I've been through the CSS checking that I'm using the clear and float in the right places, and I've checked the actual widths of all of the elements to be sure that they add up to what they are supposed to, but somehow it's still only displaying properly in Netscape after a page refresh. I've put in all of the box model hacks in my code for old browsers. The only thing that stops this from happening is removing the tag "display:table;" in my CSS. But that's used to extend the faux columns down to the bottom of the screen in Netscape. I'm not keen on any of the hacks for extending columns, so I decided on faux columns. The thing is, if it is that tag that's causing it to display incorrectly, why is it having no effect when the page gets reloaded? Try for yourself. Click a link in the menu a few times, then click the refresh button a few times. You will see the content load incorrectly, and then correctly! Puzzling. http://www.acecards.com Code: body { background-color: #999999; margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; } #container { width: 750px; /* For browsers with no escapes */ \width: 770px; /* For IE5/Win */ w\idth: 750px; /* For good browsers */ border: 1px solid gray; margin-left: auto; margin-right: auto; padding: 10px; background-color: #000000; } #banner { width: 750px; /* For browsers with no escapes */ \width: 750px; /* For IE5/Win */ w\idth: 750px; /* For good browsers */ height: 251px; background-repeat: no-repeat; clear: both; } #mainarea { clear: both; width: 750px; /* For browsers with no escapes */ \width: 750px; /* For IE5/Win */ w\idth: 750px; /* For good browsers */ background: url(images/fauxcolumns.gif) repeat-y; display: table; } #sidebar { width: 179px; /* For browsers with no escapes */ \width: 179px; /* For IE5/Win */ w\idth: 179px; /* For good browsers */ background-color: #993300; float: left; } #content { margin-top: 0px; float: right; background-color: #FFFFFF; width: 570px; /*For browsers with no escapes */ \width: 570px; /*For IE5/Win*/ w\idth: 570px; /*For good browsers */ } #footer { width: 740px; /* For browsers with no escapes */ \width: 750px; /* For IE5/Win */ w\idth: 740px; /* For good browsers */ padding: 5px; clear: both; } .FooterText { font-family: Verdana; color: #FFFFFF; font-size: 10px; text-align: right; } .Bodytext { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; font-size: 11px; line-height: 17px; text-align: justify; padding-left: 20px; padding-right: 20px; padding-top: 2px; padding-bottom: 2px; } .Bodylink { font-family: Verdana, Arial, Helvetica, sans-serif; color: #499EEE; font-size: 12px; line-height: 17px; font-weight: bold; text-align: left; padding-top: 2px; padding-bottom: 2px; } .Bodyhighlight { font-family: Verdana, Arial, Helvetica, sans-serif; color: #993300; font-size: 12px; line-height: 17px; font-weight: bold; text-align: left; padding-top: 2px; padding-bottom: 2px; } .SideBarBanner { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center; line-height:inherit; padding-top: 5px; padding-bottom: 5px; } .SideBarLink { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; } .SideBarHeadingTop { background-color: #FF9B6A; height: auto; width: 169px; /* For browsers with no escapes */ \width: 179px; /* For IE5/Win */ w\idth: 169px; /* For good browsers */ padding: 5px; color: #000000; text-align: center; font-size: 12px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; border-bottom:thin solid; border-bottom-color:#D74600; } .SideBarHeading { background-color: #FF9B6A; height: auto; width: 169px; /* For browsers with no escapes */ \width: 179px; /* For IE5/Win */ w\idth: 169px; /* For good browsers */ padding: 5px; color: #000000; text-align: center; font-size: 12px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; border-top:thick solid; border-top-color:#000000; border-bottom:thin solid; border-bottom-color:#D74600; } .SideBarMenuBlock { background-image: url(images/button.gif); background-repeat: no-repeat; height: 26px; margin-top: 4px; margin-bottom: 0px; padding-left: 20px; margin-left: 9px; margin-right: 9px; width: 159px; /* For browsers with no escapes */ \width: 179px; /* For IE5/Win */ w\idth: 159px; /* For good browsers */ text-align: left; vertical-align: middle; color: #000000; font-size: 11px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; } a:link { color: #000000; text-decoration: none; } a:visited { color: #000000; text-decoration: none; } a:hover { color: #000000; text-decoration: underline; } a:active { color: #000000; text-decoration: underline; } .Heading { width: 520px; /* For browsers with no escapes */ \width: 570px; /* For IE5/Win */ w\idth: 520px; /* For good browsers */ padding-left: 40px; padding-right: 10px; padding-top: 15px; padding-bottom: 10px; background-image: url(images/aceofspades.gif); background-repeat: no-repeat; background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; text-align: left; vertical-align: top; font-weight: bold; font-style: italic; } img { border: none; } I dont think you can wrap a <div> inside <a>, but is there any way to make an entire <div> area "linked" ? One idea - Im sure i can hook up an onclick event with javascript, but how would i change the mouse prompt when the user moves thier mouse over it ? Hi can anyone tell me if I can override embedded CSS with a linked stylesheet? Here is what I want to change: Code: <col width="40%" style="background-color:#EEEEEE;text-align:left;"> I want to change the background-color without changing anything in the above mentioned code, this means I want to change it with an extern stylesheet. Kinda new, bear with me. I have a linked image, and want to add a simple black border w css. I have this coded in an external .css: .rr25 { border-style: solid; border-width:2px; border-color: #000000; } And this is what is in my HTML: (page is linked to external .css) <tr> <td valign="top" align="center"> <a href="photo_gallery/clients/gallery_8.jpg" target="mainpic"> <div class="rr25"> <img src="photo_gallery/clients/gallery_8.jpg" width="80" height="107" border="0"> </a> </td> </tr> OK. The image displays but it is centered with tons of white space on the left and right and a small margin on the bottom. The margin grows/shrinks when I adjust the table width prop. ??????? I have an imaged logo on top of my page that I want to link to the startpage. However, whenever I link the image, I get the typical border that signalizes a link. How can I get rid of this border with the help of my Stylesheet? It seems like I can't even change the color of the border in IE?? Thanks a lot Steve Edit: Never mind -- searched before posting and did not find anything, but after I posted, there it was... Used {border:0;} on the img tag -- voila... Here's a handy tip for you ... if like me you split your big stylesheet up into smaller ones, put them into a linked stylesheet and import them, like so: PHP Code: <link rel="stylesheet" type="text/css" href="main.css"> and in the CSS file itself ... PHP Code: @import url(css/file1.css); @import url(css/file2.css); @import url(css/file3.css); @import url(css/file4.css); some of you no doubt will already do this. here's the crux tho. if you also have some miscellaneous CSS which doesn't fit in any of the extra files and are going to include them in the linking [main] file, then you must include them after the import statements. if you don't Mozilla will ignore the imports and the extra files will not be included in the rendering. code should be like this: PHP Code: @import url(css/file1.css); @import url(css/file2.css); @import url(css/file3.css); @import url(css/file4.css); body { direction: rtl !important; } IE get's this correct regardless of the order. Im looking to make it so when someone rolls over a img i have linked it makes the text (which is also a link) next to it act like it has been rolled over as well. Basically its a list set up like this. Code: <dt><a href="#"><img src="blah"/></a></dt> <dd><a href="#">Text link here</a></dd> I've seen it done a few ways, but none of them work really for my setup. The ones I've seen set up the IMG as a background positioned. Anyone have an answer? First off, I'll preface that I'm not a CSS expert by any means. I've done web development for many years, but have slowed down a great deal over the last few, so never got heavily into the aspects of CSS that completely replace HTML (tables, etc.). At my current place of employment (where my primary duty is not that of a web developer, thank god), I'm being asked to develop a set of 'templates' using primarily CSS. I've been using the CSS Sculpter plug in for Dreamweaver, and have had decent results from it, but my main issue at this point is this: When I take the CSS code from the header of the page and put it into a separate stylesheet and then link to that stylesheet, it jacks up the content portion of the site. It seems to be completely disregarding the right margin of the content div and allowing text to simply run off. When the code (without changes) is pasted back into the header of the page rather than linked to it, the issue is resolved. Here's the CSS: Code: <style type="text/css" media="all"> <!-- /* This rule resets a core set of elements so that they will appear consistent across browsers. Without this rule, content styled with an h1 tag, for example, would appear in different places in Firefox and Internet Explorer because each browser has a different top margin default value. By resetting these values to 0, the elements will initially be rendered in an identical fashion and their properties can be easily defined by the designer in any subsequent rule. */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; } /* The body is the outermost layout component and contains the visible page content. Setting properties for the body element will help to create consistent styling of the page content and more manageable CSS. Besides using the body element to set global properties, it is common to use the body element to set the background color of the page and create a centered container for the page content to display. */ body { background-color: #666; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 14px; margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */ padding: 0 0 0 0; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */ text-align: center; /* Centers the page content container in IE 5 browsers. */ } /* Commonly used to style page titles. */ h1 { color: #000; font-size: 14px; font-weight: bold; line-height: 14px; } /* Commonly used to style section titles. */ h2 { color: #000; font-size: 12px; font-weight: bold; line-height: 14px; } /* Sets the style for unvisited links. */ a, a:link { color: #000; font-weight: bold; text-decoration: none; } /* Sets the style for visited links. */ a:visited { color: #000; font-weight: bold; text-decoration: none; } /* Sets the style for links on mouseover. */ a:hover { color: #000; text-decoration: underline; } /* Sets the style for a link that has focus. */ a:focus { color: #000; } /* Sets the style for a link that is being activated/clicked. */ a:active { color: #000; } /* This is a container for the page content. It is common to use the container to constrain the width of the page content and allow for browser chrome to avoid the need for horizontal scrolling. For fixed layouts you may specify a container width and use auto for the left and right margin to center the container on the page. IE 5 browser require the use of text-align: center defined by the body element to center the container. For liquid layouts you may simply set the left and right margins to center the container on the page. */ #outerWrapper { background-color: #fff; border-left: solid 1 px #666; border-right: solid 1 px #666; margin: 0 auto 0 auto; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */ text-align: left; /* Redefines the text alignment defined by the body element. */ width: 650px; overflow: hidden; } #outerWrapper #header { background-color: #ddd; border-bottom: solid 1px #666; /* Sets the bottom border properties for an element using shorthand notation */ font-size: 18px; font-weight: bold; line-height: 15px; padding: 0px 0px 0px 0px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */ } #outerWrapper #topNavigation { background-color: #ebebeb; border-bottom: solid 1px #666; /* Sets the bottom border properties for an element using shorthand notation */ height: 10px; padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */ } #outerWrapper #contentWrapper #rightColumn1 { background-color: #ebebeb; border-left: solid 1px #666; /* Sets the left border properties for an element using shorthand notation */ float: right; padding: 10px 10px 32767px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */ margin-bottom: -32767px; width: 14em; } #outerWrapper #contentWrapper #leftColumn1 { background-color: #ebebeb; border-right: solid 1px #666; /* Sets the right border properties for an element using shorthand notation */ float: left; padding: 10px 10px 32767px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */ margin-bottom: -32767px; width: 14em; } /* Contains the main page content. When using a mutliple column layout the margins will be set to account for the floated columns' width, margins, and padding. */ #outerWrapper #contentWrapper #content { margin: 0 16em 0 16em; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */ padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */ } /* Using floated elements and a clear float class is a common method to accomplish multiple column tableless layouts. If floated elements are used without being cleared the elements following will wrap around the floated element. This class should be applied to an element after the last floated element and before the close of the container with floated elements. */ #outerWrapper #contentWrapper .clearFloat { clear: both; display: block; } #footer { background-color: #ddd; width: 650px; border-top: solid 1px #666; /* Sets the top border properties for an element using shorthand notation */ padding: 10px 0px 10px 0px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */ margin: 0 auto 0 auto; } --> </style> <!--[if IE 5]> <style type="text/css"> /* IE 5 does not use the standard box model, so the column widths are overidden to render the page correctly. */ #outerWrapper #contentWrapper #leftColumn1 { width: 16em; } #outerWrapper #contentWrapper #rightColumn1 { width: 16em; } </style> <![endif]--> <!--[if IE]> <style type="text/css"> /* The proprietary zoom property gives IE the hasLayout property which addresses several bugs. */ #outerWrapper #contentWrapper #content { zoom: 1; } </style> <![endif]--> -------------- And then the page code: Code: <body> <div id="outerWrapper"> <div id="header"><img src="hockley_header.jpg" alt="" width="650" height="150" /></div> <div id="topNavigation"> <div align="center">Nav </div> </div> <div id="contentWrapper"> <div id="rightColumn1"><h2>H2 rightColumn1 Title </h2> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. <a href="#">More...</a></p> <hr /> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. <a href="#">More...</a></p></div> <div id="leftColumn1"><h2>H2 leftColumn1 Title </h2> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. <a href="#">More...</a></p> <hr /> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. <a href="#">More...</a></p> </div> <div id="content"><h1>H1 Main Content</h1> <hr /> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id, libero. In eget purus. Vestibulum ut nisl. Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut, sapien. Fusce metus mi, eleifend sollicitudin, molestie id, varius et, nibh. Donec nec libero. <a href="#">More...</a></p> <h2>H2 level heading</h2> <hr /> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. <a href="#">More...</a></p> <p> </p> </div> <br class="clearFloat" /> </div> </div> <div id="footer">Footer</div> </div> </body> -------- Like I said, I'm completely out of my element here - learning bit by bit. CSS isn't difficult coming from a programming background, but my troubleshooting abilities are definitely not up to par. Any help on this issue is greatly appreciated. OK, I have a table I'd like to format with CSS. No problem. I have an external stylesheet that I link to for the rest of my site. I figured I'd add the CSS there and be good to go. Nope. When I link to the external stylesheet, everything else on my page is formatted correctly, except the table. It's like the table isn't grabbing the CSS information. (Example 1) When I take the CSS and put it in the header of the page, it works fine (same exact CSS, the only difference is where it's referenced). (Example 2) Some css tags have inherent "stuff" attached to them. I don't know all the ins and outs (getting closer), and I've run into one I need help with. Here's the site: http://www.carriagedriving.net/article.php Here's the div css: Code: #logo { float:left; margin: 0px; padding: 0px; } .Alogo { width:250px; height:150px; /*border:1px dashed gray;*/ } The coding in the div is an php include which results in this (banner image and alt text changes each time the page is rebuilt/refreshed): Code: <div id='logo' class='Alogo'><p align=center><a href="http://www.vermontel.com/~greenall/" target=_blank><IMG SRC="pageads/greenall.jpg" BORDER=0 alt="Greenall Carriage House"></a> </div> I get about 12 pixels of white space over the top of the image in both Firefox AND IE, so it's gotta be an inherent property to the link. Sans the link, there's no whitespace above the image. How do I "fix" this? Thanks. HeadElf Can you have both inline styles AND a linked style sheet? would this cause confusion? Hi, Not sure if I'm posting in the right area, but here goes. I'm trying to learn how to send HTML emails, and as I'm in the process of revamping our website using only CSS (no tables), I wanted to format the emails in the same way. I've created 2 html pages in Dreamweaver - in one, I linked to my stylesheets, and in the other I copied and pasted the contents of the stylesheets and embedded them in my html page. The incorrect result described below is exactly the same for both. In Outlook, following instructions I found on Macromedia's website, I created a New email, did Insert -> File, clicked the dropdown arrow beside the Insert button, and clicked Insert As Text. It inserts the images fine, so obviously it's finding the path I've specified (I have alternated between using an absolute path and using a relative path and a base tag) but the layout is completely wrong, eg. the 'LeftPanel' which I've specified as : #LeftPanel { position:absolute; top: 105px; left: 5px; width: 190px; height: 400px; border: 1px solid #000033 } is taking up the full width of the email - basically everywhere I've set a specific width/height are not being displayed as specified at all. I've used a browser to view the work I've done on the revamp of the actual website and everything is exactly right, so the stylesheets are working correctly in that context. Anyone any ideas what the problem is? Thanks a lot, J. hi. I need some formatting help. I am using niftycorners and the linked list tabs I am building seem to rest at the bottom, pushing the bottom of the rounded corners to the right of them. I have tried clear:left, clear:right, clear:both at the div and ul levels but that doesnt work. any ideas? I have attached a picture of the problem. Here is the CSS/HTML: Code: <style> body { margin:20px; } #toptabs { clear:left; } #toptabs ul { clear:left; position:relative; width:100%; margin-bottom:0; list-style:none; line-height:1em; padding:100px 0px 0px 0px; } #toptabs ul li { float:left; margin-right:5px; padding:0; } #toptabs ul li.clear { clear:right; } #toptabs a { display:block; color:#444; text-decoration:none; font-weight:bold; background:#ddd; margin:0; padding:0.25em 1em; border-left:1px solid #fff; border-top:1px solid #fff; border-right:1px solid #aaa; } #toptabs A:hover, #toptabs A:active, #toptabs A.he link, #toptabs A.he visited { background:#bbb; } #toptabs A.he link, #toptabs A.he visited { position:relative; z-index:102; } </style> </HEAD> <BODY> <div id="header"> <div id="toptabs"> <ul id="venture"> <li id="current"><a href="#"><span>Profile</span></a></li> <li><a href="#"><span>Q&A</span></a></li> <li><a href="#"><span>Recommendations</span></a></li> <li><a href="#"><span>Connections</span></a></li> </ul> </div> </div> </BODY> Hello All, I have an image with a text label to the right that is linked. Now, I want a little whitespace between the image and the text, so that the text doesn't butt up right against the image. To accomplish this, I could use a non-breaking space ( ) However, the space then becomes part of the link and it gets underlined. So, by adjusting the image's margin (or padding) CSS, I can achieve the desired result... at least in Internet Explorer. Firefox/Safari/Chrome seem to underline a linked image's margin as well. I tried using "padding" CSS instead, but produced the same result. How can I get Firefox/Safari/Chrome to underline JUST the text in a link, and not the image (and it's margin) as well? This is how the code is displayed in IE: http://img407.imageshack.us/img407/2360/pfieeu9.jpg Firefox/Safari/Chrome: http://img407.imageshack.us/img407/5421/pffirefoxvv1.jpg You can see the little extra "nubbin" of underline between the icon image and the text. CSS: Code: a.red10ullink:link {color: #a80000; font-size: 10pt; font-family: arial; text-decoration: underline;} a.red10ullink:visited {color: #a80000; font-size: 10pt; font-family: arial; text-decoration: underline;} a.red10ullink:hover {color: #333333; font-size: 10pt; font-family: arial;} img.icon {vertical-align: middle; border-width: 0px; margin: 0px 5px 0px 0px;} HTML: Code: <a href="somepage.html" class="red10ullink"><img src="icon_pf.gif" alt="" width="20" height="20" class="icon" />Printer Friendly</a> Thanks! I need a way to make a menu id be just as long as the content, no shorter or longer, by somehow "linking" the id's to make them both end at one point. An example would be some sites that have the main content really long and then the menu running right down the side, even if there is nothing in it. If you don't understand what I mean, please ask and I will either give an example or clarify. Hi all... I'm designing a website based on this structure by Paul O'Brien: http://www.pmob.co.uk/temp/fixedlayoutexample6.htm It's working fine, except for one thing... the first time the page loads in IE6, the content div is offset about 5px to the left - see screenshot 1 (I've made it a nasty green, so it's obvious) When you hit refresh, it corrects itself and displays perfectly. (screenshot 2) Is this a known bug in IE? Or is it a problem in the design? After hours of Google searching and working to find a solution, this is my last gasp. I'll qualify it by saying I'm a casual hobbiest, not a pro at all. In plain text, my problem is that I have a string of boxes I want to appear side-by-side...float: left. In firefox, on a hard refresh, these elements don't appear side-by-side, but on top of each other. It works just fine in IE. Example... Should be: 1 2 Is: 1 2 Below is my code. To see the problem in action, http://www.mcconaha.com Also, the code isn't great, and I know that. I'm building everything now, but can't get past this problem. Code: body{ background-color:#666666; background-image: url(../images/header-back3.jpg); background-repeat: repeat-x; text-align: center; margin-top: 0px; } div#header{ text-align:center; } div#nav { margin-top: 20px; } div#daybox { width: 100px; border: #333333; border-style:solid; border-width: 2px; background: #E0E0E0; margin-top: 35px; margin-right: 10px; margin-left:auto; float:left; height: 250px; display:block; } div#daybox p { font: Arial; font-size:9px; font-family:Arial, Helvetica, sans-serif; text-align:left; padding: 5px; margin: 0; display: inline; } div#dayboxthumb img{ margin: 0; padding: 5px; background: #FFFFFF; border: none; border-style: none; display: inline; } div#featuredimage { margin-top: 50px; } div#featuredimage img { padding: 15px; background:white; border:1px solid black; } div#gallerycontainer { margin-top: 35px; } .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .clearfix {display: inline-block;} /* Hides from IE-mac \*/ * html .clearfix {height: 1%;} .clearfix {display: block;} /* End hide from IE-mac */ Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="js/lightbox.js"></script> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <link href="css/stylesheet.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id="header"><img src="images/logo.jpg" /></div> <!-- yeah, it's a table to center it. I spent way too long trying to do it with css --> <table cols="1" align="center" border="0" ><tr><td align="center"> <div id="daybox"> <div id="dayboxthumb"> <a href="http://www.mcconaha.com/upload/2006/10/31/chuq1.jpg" rel="lightbox[lchuqhalloween]" title="smack" ><img src="http://www.mcconaha.com/upload/2006/10/31/chuqthumb.jpg" border="0"></a><a href="http://www.mcconaha.com/upload/2006/10/31/chuq2.jpg" rel="lightbox[lchuqhalloween]" title="smack" ></a> </div> <img src="http://www.mcconaha.com/images/dates/October.jpg" /> <img src="http://www.mcconaha.com/images/dates/31.jpg" /> <img src="http://www.mcconaha.com/images/dates/2006.jpg" /> <p>Chuq's office Halloween.</p> </div> <div id="daybox"> <div id="dayboxthumb"> <img src="http://www.mcconaha.com/photos/thumb1.jpg"> </div> <img src="http://www.mcconaha.com/images/dates/October.jpg" /> <img src="http://www.mcconaha.com/images/dates/30.jpg" /> <img src="http://www.mcconaha.com/images/dates/2006.jpg" /> <p>This is a test entry.</p> </div> </td></tr></table> </div> <div id="nav"> <img src="images/navmap.jpg" width="257" height="26" border="0" alt="" usemap="#navmap_Map"></a> <map name="navmap_Map"> <area shape="rect" alt="archives" coords="178,0,256,26" href="http://www.mcconaha.com/archives.php"> <area shape="rect" alt="contact" coords="79,0,154,26" href="mailto:contact AT mcconaha DOT com"> <area shape="rect" alt="about" coords="0,0,56,25" href="http://www.mcconaha.com/about.php"> </map> </div> </body> </html> At this point, I have no idea what to do. Given all the Googling, not many other people do either. Any suggestions on this would be helpful if I'm wrong about it being part of a well-known FF bug... Can anyone fix this problem? The site looks weird in Firefox but when you refresh the browser, it looks okay. why is this http://www.spunlogic.net/Gmaac/index.htm It's totally messed up on Mac IE, but I gave up trying to fix that problem Hi again, i've built an image gallery using an unordered list and php to grab 'em from the database. when you first go to the page (both in FF and IE) the footer bar sits in the middle of the page, until you refresh, then it's fine. same thing happens when you click to enlarge it. Here's the page Here's the CSS; Code: /* SHOWCASE STYLE - firefox */ html>body ul.showcase { margin:5px 1px; margin:auto; list-style: none; width:760px; } html>body li.showcase { margin-top:5px; margin-left:10px; float:left; width:180px; } /* SHOWCASE STYLE - IE */ * html ul.showcase { margin:5px 1px; margin:auto; list-style: none; width:750px; } * html li.showcase { margin-top:5px; margin-left:8px; float:left; width:179px; } img.showcase { border:1px solid #CCCCCC; } i'm sure it's somethin' to do with clearing the floats, but i just don't get why it's cool after you refresh. thanks! |