CSS - Incorrect Image Placement...sometimes...
I'm aware that there are several threads addressing the issue of image placement, but I'm unable to find anything referencing the specific issue I'm having, so I figured I'd ask...
Let me first say that I am a professional martial arts instructor, not a web developer. What I do know how to do is completely self-taught. Bearing that in mind, I've discovered a relatively minor issue with our site, and I'm curious as to input here. Blue Mountain Martial Arts You will notice two "bamboo sprigs" in the upper right and left hand corners of the page. It took me quite awhile to get these to the actual edge of the browser window, but it seems that what I did was almost too effective. When viewing yahoo's cache of the page the bamboo is still in the upper corners of the browser window, rather than still lined up with other page elements. Google's cache for some reason places the left bamboo in the middle of the page. This is also an issue when the browser window starts "small", and is then maximized. The images in that case do not re-align, and thus will stay where they originally loaded, which may be in the middle of the page. I'd like prospective martial arts students looking at our studio to be drawn in, rather than driven out by a malfunctioning website. Most of the time, the site works fine, but I'd like to make that 100%. Input...? What should I change to have the images load on the edge of the screen, but reposition themselves relative to the other page elements if necessary? Similar Tutorialshello i have managed to get a working menu where i want it and have managed to have a fixed header and footer. however, i have a problem when the main page scrolls the dropdown menu seems to scroll with it. instead of the dropdown being below the heading where it normally is, if i scroll the page the header and footer stay where they are but if i click the menu heading again, the dropdown is halfway down the page. i have attached css and the correct and incorrect screenshots to give you an idea if my outline is fuzzy. i would be grateful if someone could tell me where i am going wrong? i am only learning css and would be grateful for any advice. many thanks CSS CODE Code: padding: 0px; font-family: Arial; } /* Don't touch */ ul#jmenu { margin: 0px; padding: 0px; list-style: none; } ul#jmenu li { float: left; margin: 0px; padding: 0px; //width: 1px; /* ie */ //vertical-align: bottom; /* ie */ } ul#jmenu li a { display: block; white-space: nowrap; } ul#jmenu li ul { display: none; position: absolute; margin: 0px; padding: 0px; list-style: none; zoom: 1; /* ie */ } ul#jmenu li ul li { float: none; } /* Styling starts here */ ul#jmenu { margin-top:80px; width: 100%; height: 40px; background: #3f4a58 url('../images/menu-bg.gif') repeat-x left top; } ul#jmenu li { background: url('../images/separator.gif') no-repeat right center; padding: 0px 10px; } ul#jmenu li a:link, ul#jmenu li a:visited { padding: 0px 10px; height: 40px; line-height: 40px; color: #e4ecf6; font-size: 13px; text-decoration: none; background: none; } ul#jmenu li a:hover { color: #ffffff; background: #3f4a58 url('../images/menu-bg.gif') repeat-x left bottom; margin-top:0px; } ul#jmenu ul { background-color: #3f4a58; border-left: 1px solid #7a8087; } ul#jmenu li ul li { padding: 0px; background: url('../images/sub-separator.gif') repeat-x left bottom; } ul#jmenu li ul li a:link, ul#jmenu li ul li a:visited { ; min-width: 100px; //width: 100px; /* ie */ font-size: 12px; height: 30px; line-height: 30px; } ul#jmenu li ul li a:hover { background: #3f4a58 url('../images/menu-bg.gif') repeat-x left top; } #header { position:fixed; width:100%; left:0px; top:0px; height: 80px; background: #808080 url(../../images/logo.jpg) no-repeat left center; } #logo { /*background-image:url(../../images/logo.jpg) no-repeat left;*/ } #footer { position:fixed; left:0px; bottom:0px; height:30px; width:100%; background:#808080; border-top:1px solid #333333; } .footertext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; margin:10px; display:block; } /* IE 6 */ * html #footer { position:absolute; top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px'); } #main{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; height:100%; margin-top:25px; } #main p { margin-left:20px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } HTML CODE Code: <div id="header"> <ul id="jmenu"> <li><a href="#">Home</a></li> <li> <a href="#">Requests</a> <ul> <li><a href="#">Item 2-1</a></li> <li><a href="#">Item 2-2</a></li> <li> <a href="#">Item 2-3</a> <ul> <li><a href="#">Item 2-3-1</a></li> <li> <a href="#">Item 2-3-2</a> <ul> <li><a href="#">Item 2-3-2-1</a></li> </ul> </li> <li><a href="#">Item 2-3-3</a></li> </ul> </li> <li> <a href="#">Item 2-4</a> <ul> <li><a href="#">Item 2-4-1</a></li> <li><a href="#">Item 2-4-2</a></li> <li><a href="#">Item 2-4-3</a></li> </ul> </li> <li><a href="#">Item 2-5</a></li> </ul> </li> <li><a href="#">Reports</a></li> <li> <a href="#">Control Panel</a> <ul> <li><a href="#">Item 4-1</a></li> <li><a href="#">Item 4-2</a></li> <li><a href="#">Item 4-3</a></li> </ul> </li> <li> <?php echo $tNGs->getErrorMsg(); ?><a href="<?php echo $logoutTransaction->getLogoutLink(); ?>">Logout</a></li> </ul> </div></div> Hi, I am trying to line up a few images at the top of this page: iamthelab dotcom The 2 rectangles need to be aligned to the top of the page and I can't for the life of me figure out what I am doing wrong. I'm sure the solution is simple. No help from other forums, maybe you guys can assist. Thanks! Hi, I'm trying to achieve the raised/gradiated background effect you'll see on the following URL (scroll halfway down the page) csszengarden Kyoto version (sorry, since I'm a new user I can't provide a direct URL) with an image gradient repeated on the y-axis. It is difficult to give an example of the image without being able to attach and image here. I've tried so many things I've forgotten my own name. Please let me know if there is any more information that I can provide. Thanks! hi, i'm trying to add an outer glow image to my site, starting about a 100px from the top. when i use padding on the element i'm adding the trim to, the entire site including the banner shifts down. so i tried using background position, which works until i add repeat-y, which causes it to repeat in the 100px where i don't want it. is there a way to make an image only repeat down? How can I best place Image maps with CSS? It seems the text placement command works, but I don't know whether that's the best way. Here's a test page I threw together which uses this command to place the image map: http://www.gamexplain.com/test2.htm So is there a better way? How should I format the command? Thanks! Hello, My home page works fine on all browsers and platforms except safari. http://www.caillouette.com/EoLtest/ The two buttons below the main nav should be above the big blue "Request Information" button. Can anyone help? thanks -S Hello all, I'm new on this forum, but not that new to Web Design. I am re-working my website that can be found here. What I really want to figure out is how to replace the white box in my #mainContentWrapper class with an image that I made (which I'm going to post at the bottom of this). I have tried to locate examples of this online to try to learn something from those, but all of my efforts have come up short. I have also been able to chage the background image for that element, but I am still left with the white box on top of it. I guess I'm just missunderstanding the CSS box model. If anyone can lend some advice on this subject, I would greatly appreciate it. (URL address blocked: See forum rules) *edit: I can't find the guidlines for posting links to my page and the image I'm talking about so I'll just give you the url. the site is: (URL address blocked: See forum rules) and the image is at: starvingyoungartists.com/contentBG.png Friends, I am trying to provide a 'Print' functionality on my HTML page. The idea is to have a small print icon appear on the left side, followed by the words 'Print'. On clicking on the 'Print' link a popup window should open. The popup etc. works fine. How ever the word 'Print' is over-lapping the 'printer' image. The printer image comes up but the word 'Print' comes right on top of it. How can I place the printer image, and the word 'Print' on its right side? This is the current peice of CSS code I have written. What could be wrong in it? Code: .linkprint { background-image: url('/abc/kap/com.ahj.wpc.layout/images/icon_print.gif'); background-repeat:no-repeat; text-align:right; margin-right: 10px; font-size: 8pt; font-weight: bold; } Hey everyone, I'm redesigning a site and I'm running into some problems in firefox with the placement of the header-background image. The problem is that firefox places the image about 15 pixels below the intended area. When I add a border of 1 pixel to the header div firefox places the image correctly. I don't have this problem when viewing the site in IE. I've coded the following XHTML and css: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>ParaCentrumEeldeHoogeveen</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="Content-Language" content="nl" /> <link rel="stylesheet" href="css/layout.css" type="text/css" /> </head> <body> <div id="container"> <div id="header"> </div> </div> </body> </html> And the css file: Code: html { padding: 0px; margin: 0px; } body { background: #3a60db url('../gfx/background.jpg') repeat-x; font-family: arial, "lucida console", sans-serif; font-size: 12px; color: #000000; text-align: center; margin: 0px; margin-top: 0px; padding: 0px; } #container { border: 0px solid #ff0000; width: 760px; margin: 0px auto; padding: 0px; text-align: left; } #header { background: url('../gfx/header.jpg') no-repeat; height: 238px; width: 760px; padding: 0px; margin: 0px; } Screenshot of the problem Does anybody know what the problem is? Thanks in advance. Grtz. Arjen Hi, I don't know what is wrong with my CSS. I created an ads in eBay with few photos. The thumb images should be aligned properly, but currently is not. I have used firebug to check its css structure, but I can't find anything unusual. Any suggestion would be very appreciated. Thanks Hi there, I'm having a FF/IE problem! As usual. I have a site up (www.silk-works.com)which thanks to BonRouge and Dan_A has a footer that sits in the correct position, ta peeps. The problem I have now is that - www.silk-works.com/jane/jane.html - I have Images floated right and I want text to appear alongside - which FF handles fine, but IE bumps below the first Image.. Code: <img src="../photographs/jane01.jpg" alt="" id="containerImageRight"/> <img src="../photographs/jane03.jpg" alt="" id="containerImageRight"/> <p>some ample text....</p> [CODE] CSS for image placement is; [CODE]#divWrapper #divContainer #containerImageRight { margin: 0px 10px 10px 10px; float: right; border: 2px solid #6E6447; padding: 0px; } CSS for <p> tag is; Code: #divWrapper #divContainer p { font-family: "Gill Sans MT", Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; padding-left: 10px; letter-spacing: 0.05em; line-height: 1.3em; padding-right: 10px; color: #6E6447; } Any suggestions greeted with a free ice cream. Regards, James. Below is my html in which I want to embed "legend" 30px to the right of "map". After much playing with the code, I need help. "legend" is pushed underneath "map" in this version. Other arrangments have also failed. If I get rid of the "border" and "leg" div tags, they are placed side by side, but I have littile control over where "legend" is placed. Any insight would be appreciated. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <head> <title>CSS</title> <style type="text/css"> #page {position:absolute;border: 1px solid black;left: 20px;top: 20px;padding-top: 25px;padding-left: 25px;padding-right: 25px;padding-bottom: 25px} #printArea {position:relative;border: 1px dotted black;padding-right: 5px;padding-top: 5px;padding-left: 5px;padding-bottom: 110px} #leg{position:relative;border:1px solid black;width:170px;top:0px;right:0px} .map {position:relative;border:1px solid black} .legend {position:relative;top:0px;left:880:0px} </style> </head> <body> <div id="page"> <div id="printArea"> <div id="border"> <embed class="map" id="map" src="index.svg" width="850px" height="675px" type="image/svg+xml"/> </div> <div id="leg"> <embed class="legend" id="legend" src="legend/legend.svg" width="170px" height="625px" type="image/svg+xml"/> </div> </div> </div> </body> </html> Hi there. I'm working on a page, and I'm a bit confused about how to place my CSS on it. The page has a nutritional search box that will be the primary focus of the entire site. Right now I have only a front page. So currently I have one external CSS file with the CSS for the page layout, along with the CSS to arrange the search box. But now I want to bring up a javascript popup with just the searchbox and another table. I can't use my original external CSS because I don't want the main page naviagation in the popup, nor do I want to copy the CSS for the search box everywhere. What is the correct way to do this? I almost want two external css files. I want to include BOTH files in the main page, and only the file associated with the search box in the popup. But in the reading I've been doing it doesn't seem possible. Even when I try copying the CSS for the search box, Firefox doesn't seem to like me attaching a different CSS file in the popup then I had in the main page. Please help! Or at least point me to a useful article. Thank you! Hi, If you view the site below with IE, you'll probably notice that the main menu going across the top is somewhat off. By off, I mean it doesn't vertically align in the middle, but it does with Chrome. http://www.vitality-bodymindsoul.com/ Any idea what's causing this? Thanks much. Hey, guys. I've tried everything to get this to work. Basically the main content of our page is in a table centered on the page. We want a nice big skyscraper ad right next to the table that isn't aligned with the right portion of the page (because if it is, when the window is shrunk, the ad goes over top of the page content). How do I offset the ad position from the table? Will it work with different resolutions too? Right now I have the div tag inside the table, looking like this: Code: <div style="float:right; clear:none; margin:0 10px 0 0;"> <img src="structure/images/VendorAds/skyscraperAds/homepage/skyscraper01-Q2.jpg" width="160" height="600" /> </div> But it puts it all the way to the right next to the scroll bar, and it offsets the main content to the left. How do I get the ad to appear right next to the table without offsetting anything, and without moving over top of the content when the page is shrunk? Any help is appreciated. EDIT: I fixed my own problem. Since the main content was a table, I wrapped a table around the main content, put the ad in a <td> element, then one on the left side to recenter it. Can anyone tell me how I can move the navigation bar I'm using below so that it left aligns with the table below it? You can view the bar he http://oharenoise.org/2010_news_releases-2.htm I was told that the main nav element has a left: 75 px attribute attached to it but I can't seem to find it, embedded or on the external CSS. Maybe I'm blind? The CSS external sheet is found he http://oharenoise.org/ONCC_Style_Sheet.css Thanks, Rebecca I'm brand new to CSS and I've been trying to customize a template, but it seems whenever I move the Search bar from the top left into the menu bar on the right side it offsets the placement of other items and I cannot for the life of me figure this out. My website is floydsewingmachines dot com (I guess it won't let me post the actual address?) but any suggestions or help would be greatly appreciated. Thanks! I'm sure this is some basic thing that's just slipped my mind. http://www.onlineeditions.com/opportunityhouse/ As you can see, it's rendered differently between FF and IE: the content column on the right has a few nested divs to hold background images, but on FF (And Safari) the "right" div seems to have slipped down and to the left a few pixels. Code and css is all valid, per w3c. If someone can help me find what's gone wrong here, I'd be most thankful. Hello, I'm new to the world of CSS. Hopefully that won't be TOO obvious to anyone looking at my code... Anyway, it hasn't taken long for me to find frustrations with IE. I'm having issues with elements on two pages of the site I'm working on: the index page (wiayouthmountainland.org ) and the apply page (wiayouthmountainland.org/apply.php ) On the index page there is some white text in the center of the page. It is where it should be in FF but is way over to the right in IE. On the apply page there are some textboxes on the right side of the page. Again, the placement is correct in FF, but they are too low in IE. I don't know if the same thing is causing the problems. I don't really know what it is I'm looking for. If someone wouldn't mind taking a look to see if they can figure out what is messing me up, I'd really appreciate it! Here is a link to the css: wiayouthmountainland.org/WIA.css . Thanks in advance! Jules |