CSS - Image Map Size Issues
Well, not exactly an image map, more like links on an image.
You'll have to excuse some of my ignorance, I only started with CSS a little over a week ago...so you can imagine. I found this neat little trick and wanted to implement it on my site. I'm undertaking a redesign of our companies old site...which was terrible. I figured it would be a fine time to learn CSS. The idea here is that there are about 50 points on this map that are links to pdf files, we decided that it would be nice to be able to see little thumbnails and some basic info on each point without opening the pdf. The site does this just fine, but unfortunately won't work in anything lower than 1280x1024. I can't just resize the images because then the links will be messed up as they're posisioned by the pixel. I have no idea what to do to get this to work, it may just be a lost cause. If someone tells me to forget it, and it's just not going to work...I can live. It's really just a neat thing I wanted to see work, it's not crucial. Any ideas at all would be great, at the very least I might learn something Oh...here's the site: http://www.sanitaryengineer.co.medina.oh.us/gis/test.html Thanks a million Similar Tutorialshey all..got a wierd one..well to me anyway ! hope someone can tell me what im doing wrong !! i have code like this Code: #banner img { height: 15em; width: 25em; margin: 0.5em; } to manage the size of an image but i want to add another image to the page and i can't the css can be found here and the page im working on can be found here if anyone has any ideas that wouldbe marvelous... thanks RF Hello. How do you stretch a background-image so its height and width are equal to its parent? Hello, not entirely sure how to go about this, but I'm using Dreamweaver CS5 and I'm working on my home page. The way I have it set up is I have a "sidebar" to the left, then a large "main_image" to the right of that which begins my "container" div followed by some "body_copy" below that. Everything looks good when the window is in a max size. The problem arrises whenever I resize my window the main_image moves to below the sidebar and everything just seems to shift down... The main_image is set to relative so the body_copy text can form properly under it. Is there any way to have the image remain stationary despite window size? Thanks for your help!! My code works well in Internet Explorer and Safari but it does not work the way I want it to in Firefox and Opera. My items with red borders should always stay close to the blue bar in the background. But in Firefox and Opera the body background moves to the left when the window size is small, and the items with red borders appear to move away from the blue bar. The problem is the way in which these browsers center the background image for the body. Can anyone help me fix this issue? Thanks! Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Demo</title> <style type="text/css" media="all"> html, body { padding: 0px; margin: 0px; height: 100%; width: 100%; text-align: center; } body { background: #555 url(http://www.glidestor.co.uk/images/PageBackground.gif) repeat-y scroll 50% 0; color: #111; } #page { width: 617px; margin: 0 auto 0 auto; padding: 0 0 0 160px; text-align: left; position: relative; border: 1px solid #55aa77; } #homeFeatures { margin: 420px 0 0 0; } #homeFeatures #f1, #homeFeatures #f2, #homeFeatures #f3 { padding: 0 40px 0 12px; font-size: 9pt; font-weight: 300; width: 200px; display: block; text-decoration: none; float: left; border: 1px solid red; } </style> </head> <body> <div id="page"> <div id="homeFeatures"> <a href="#" title="Item 1" id="f1"><strong>Item 1</strong>J khfdg jkfkfhkjfsh ksh fhdk ghjkhfsdkjg hsdfjkhsdfjkkjsdf hgkjfsd hgkjfdh gkjfh kjghkjfdh kfj hkfjd hfkdjg hk jghfsdkj ghfsdjk hgfjdhg jsdfgh sdfj ghf.<span>more</span></a> <a href="#" title="Pring Design" id="f2"><strong>Item 2</strong>T khfdg jkfkfhkjfsh ksh fhdk ghjkhfsdkjg hsdfjkhsdfjkkjsdf hgkjfsd hgkjfdh gkjfh kjghkjfdh kfj hkfjd hfkdjg hk jghfsdkj ghfsdjk hgfjdhg jsdfgh sdfj ghf.<span>more</span></a> <a href="#" title="Item 3" id="f3"><strong>Item 3</strong>B khfdg jkfkfhkjfsh ksh fhdk ghjkhfsdkjg hsdfjkhsdfjkkjsdf hgkjfsd hgkjfdh gkjfh kjghkjfdh kfj hkfjd hfkdjg hk jghfsdkj ghfsdjk hgfjdhg jsdfgh sdfj ghf.<span>more</span></a> </div> </div> </body> </html> Hello, I'm using jquery and the cycle plugin to cycle through a few images on my homepage inside a container.When i load the website at any browser size, it seems to do the proper thing. The problems arise when i try to make the browser bigger or smaller after that, it does funky things to the images. If you begin to scale the browser when the first image is displayed, it also seems to scale properly for that first image, but goes haywire after that. It pretty much does it in all browsers and i can't seem to figure out if it's something im not setting properly within css or if it have something to do with jquery and the cycle plugin. here's the website thus far: www.beaucoupla.com this is my first time writing code so please any help would be appreciated! Code: @charset "utf-8"; /* CSS Document */ #mainWrapper { /* background:#000 right top no-repeat; min-width:1000px; min-height:775px; border:0px; background-color:#000; */ padding: 0 0 0 1px; margin:0; top:0; left:0; width:100%; } .mainbar { position:absolute; top:0px; left:0px; display:none; visibility:hidden; width:78%; min-height:100%; height:auto; /*This works for IE7 min-height:775px; height:775px;*/ border-right: #FFF solid medium; } #imagelist { left:0; position:absolute; display:block; visibility:visible; /* width:auto; static size */ } #imagelist img { display:block; } #imagelist img.first { display:block; } .theimage { position:absolute; left:0; width:100%; /* Adding this works for IE7 */ /* height:775px; */ border-right: solid #FFF medium; } #podcast { /*right:303px; */ position:absolute; top:0px; left:0px; height:100%; } .about_info p { font-size:1.1em; } .contact_info, .about_info, .news_info { position:relative; margin-top:4em; margin-left:10%; width:78%; font-family:Arial, Helvetica, sans-serif; font-weight:bold; font-size:1.3em; color:#FFF; height:100%; } .contact_info #title, .about_info #title, .news_info #title { font-size:1.75em; padding-bottom:1.5em; color:#1ac089; color:#03c5d1; } .contact_info .heading { color:#c04141; font-size:1.2em; } .contact_info .mail { text-decoration:underline; } .contact_info a:hover { color:blue; text-decoration:underline; } .news_info .heading { color:#c04141; } body { /*width:1400px; height:775px;*/ padding:0; margin:0; border:0; background-color:#000; } #share td { padding-left:0.5em; } #share { margin-left:1.4em; margin-top:0; border-top:0; /* padding-top:5; */ font-size:0.65em; } .sidebar { position:relative; font-family:Arial, Helvetica, sans-serif; font-weight:bold; margin-left:78%; margin-top:1em; font-size:2em; color:#FFF; } ul { border:0; margin:2px; text-decoration:none; } li { list-style:none; } a { text-decoration:none; color:#FFF; } a.home:hover { color:#bc7bd4; } a.news:hover { color:#7bd488 } a.podcast:hover { color:#d47b88; } a.blog:hover { color:#d4cb7b; } a.about:hover { color:#7bd4c6; } a.contact:hover { color:#d4a37b; } a.twitter:hover { color:#33ccff; } a.myspace:hover { color:#999; } a.facebook:hover { color:#5b61d5; } Hi, Here's the site I'm working with: http://www.cjfusion.com I want to get that image centered on the browser window and then depending on how big the viewers screen is, the browser will cover up the left and the right. I hope that makes sense. I almost want it to be fluid, but I'm unsure how to do that. Ask questions if this doesnt make sense. Its hard to explain. -CJ Hi, I hope someone can help. I have a blog with a fluid design (as best I can) layout. Images are floated in the main post, with width and height specified as a %. Quite often when I first load a page with an image, the image is very small and anchored to the top left of a box (defined by a border) that is the correct dimensions. When I resize the window containing the blog, the images fill out the defined box and everything is fine. Can anyone help me avoid the erratic behavior when I first open a blog page? I'm using IE7 and IE8 and see the same thing in both browsers. I'd post the URL for the blog so anyone interested in helping could see what I mean, but as a relatively new member here, I am not allowed to do so. Thx in advance for any help that can offered. Bill I am recoding the site jthensley dot com (The forum wouldn't let me list the site needing assistance) to HTML 5 and CSS. I've redesigned some features, which are basically already in the new layout, at jthensley dot com / 2012alpha The 2 horizontal neon lines and the vertical line are simply repeated outside of the header by the CSS. However, one problem I have is that the vertical line that is repeating becomes unaligned with the header if the browser window is expanded. Is there anyway to have it as a repeating background, set to begin at a certain pixel position, and move to the right to maintain alignment with the header as the page is expanded? Secondly, at the bottom, you have the copyright line, which I plan to use as a repeating background or image, as well, and my picture to the right, standing on top of the copyright line. Idealy, I would like the picture of myself to be in a certain area, and push down as page contents make the page longer, but maintain it's "link" with the footer. Any suggestions on how to achieve that? Thanks for your help! This is quite a refresher/learning experience for me! The CSS I have already written is below. * { margin: 0 auto; padding: 0; } body { font-size: 62.5%; font-family: Helvetica, sans-serif; color: white; background-color: #000000; background-image: url(images/horzneon.png), url(images/horzneon.png), url(images/verneon.png); background-position: 0px 137px, 0px 172px, 250px 0px; background-repeat: repeat-x, repeat-x, repeat-y; } ul#nav { height: 185px; width: 1024px; margin: 0 auto; background: url(images/header.jpg) no-repeat; } height: 185px; width: 1024 px; Thanks for taking the time to read my question. I have a container that has a background image. My container has rounded corners right top and bottom. This is done by putting subsequent containers above and below the container in question. I want to put text over the background image in the spot that looks like where text would go. My problem I think, has something to do with using <p> to put my text in. It automatically puts a space above and below the <p> area. I don't want this space. What else can I use? I tried <span> but that was no good. I tried setting the height on <span> but it didn't do anything. What I want to get to is my background-image in a container that has rounded corners with text in the "text area" warrenpersowich.com is the site that works right now, but has no background image in the top right container. warrenpersowich.com/IndexNew has the background image in, and I've made the top and bottom containers that have the rounded edges in them red so you can see them. Also note that they seem to function differently in FF and IE.... ya ya I know. If I use height: FF heeds it and IE doesn't. If you check out the css, the container in question is .CBBox4 css On my website I have the root folder that contains a folder called images along with others such as a members folder. I created an index.php and a styles.css page inside the members folder. Then I tried to add a background image to the index page via css. The background image never loaded on the web page, however the rest of the css did. Is this an issue with the images being in a different folder? Is there a way to link to the images without copying them into the new folder? Thanks. I know that IE reacts to CSS different than FF or Opera etc. I 2 columns (left & right). When the page loads it shifts the columns to the right & down a few pixels. When you roll your mouse over it they go into place. This only happens in IE. Also, I have an image that is 45% transparent. I saved it as a png and gif. IE will not display it as transparent. In FF & Opera it does. Then in Opera, the background image does not center. It aligns to the top. I know that they are some hack to fix these issues. I used Google, to try an resolve my issues. I my search terms must not have been correct. Here is what I am using thus far. CSS Code: Original - CSS Code body { background-image: url(images/main-bg.jpg); background-repeat: no-repeat; background-color: #495877; background-position: center; } h3, h4 { font-family: Verdana, Arial, Helevetica, sans-serif; font-stretch: wider; color: #000; } #leftcolumn { float:left; margin-top: 22%; margin-left: 20%; width: 120px; height: 250px; border: 1px solid #FAF0E6; background-image: url(images/fade_bg.png); background-color: transparent; padding: 5px; padding-left: 8px; font-family: Poor Richard;/*Verdana, Arial, Helevetica, sans-serif;*/ font-size: small; font-color: #FFF; } * html #leftcolumn { /*IE only style*/ margin-top: 22%; margin-left: 10%; padding: 0px; padding-left: 0px; margin-right: 0px; } #leftcolumn a { padding: 3px 1px; border: 0px solid white; display: block; width: 100%; text-decoration: none; font-weight: bold; color: #000; } #leftcolumn a:hover { background-color: #cca411; } #rightcolumn { float:left; margin-top: 22%; margin-left: 6%; width: 350px; min-height: 300px; border: 1px solid #FAF0E6; background-image: url(images/fade_bg.png); font-family: Verdana, Arial, Helevetica, sans-serif; font-size: smaller; color: #FFF; padding: 5px; padding-bottom: 8px; } * html #rightcolumn { /*IE only style*/ height: 300px; } .navindent { font-family: Scholar; /*Verdana, Arial, Helevetica, sans-serif; */ font-size: 10px; text-indent: 8px; color: #000; body { Learning CSS has been fun!! Thank You for any suggestions. Please view: http://www.archanix.com/aib/about/ Notice the red square aib logo towards the bottom of the page. I have been successful in aligning the image to the bottom of the div. But because I'm using position:relative; bottom:72px; it pushes my footer down farther than I want. Any way i can get around that? Any help would be greatly appreciated. Thanks, Jesse Hi there, I'm completely new to CSS. I'm trying to do this more than one hour but can't get it right. Code: <font color='white'><font size='1' face=verdana size=1> I couldn't find the equivalent of this in CSS This is my last experiment but it doesn't seem to work either Code: fontstyle { color : #FFFFFF; font-family : verdana ; font-size :1;} Thanks So when using Netscape 7.2 & Opera 7.5 and MSIE 6.0, How do you get a simple tag like body { font-size:small; } to be equal in all browsers? Setting IE Text Size to Medium, and Opera's Zoom to 100% (both defaults) and Netscape 7.2 to 120% (not the default) is one way, but is there a CSS way? By the way, the child element hack "body>div {property}" wasn't working no matter what I tried, by not working I mean to say Netscape never would read it or apply it. It appeared to be that Opera & IE need to read the same value while Netscape needs to apply a larger size to be equal to IE's and Opera's rendering. B I could see this as potentially being really easy to do or really hard to do. I'm hoping for the former. Suppose I have 3 divs, A, B, C and that I want the total width of A + B + C to equal the width of the screen. Suppose also that I want them to be inline. How can I have B to be a fixed width while A and C expand depending on the screen width (such that the width of A = the width of C)? I cannot figure this out. I've tried adding clear: both in several places, I've tried overflow: hidden and I've tried cursing. Nothing works! How can this be fixed so that in IE6 the divs are not staggered vertically?? Code: <div style="height: 38px; margin: 0px; padding: 0px; width: 140px;"> <div style="float: left; height: 38px; width: 38px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="38" border="0"></div> <div style="float: right; height: 38px; width: 102px;">copy</a><br>copy</a></div> </div> <div style="height: 38px; margin: 0px; padding: 0px; width: 140px;"> <div style="float: left; height: 38px; width: 38px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="19" border="0"></div> <div style="float: right; height: 38px; width: 102px;"><img style="border: 1px solid #444444; vertical-align: middle" src="http://www.diversifieddesigns.com/GRAPHICS/Spacer.gif" alt="" width="38" height="8" border="0"></div> </div> Hey, I came across this forum and hopefully somebody can help me. Here is my website: http://www.jmuelectricmotorcycle.tk When the page is in firefox, If you page zoom out, the navbar goes under the content instead of staying on the right. I think it has something to do with padding and the sidebar not having enough room so it drops down. When I set the content to 1005 instead of 1000, it works, but there's a giant 5 pixel gap between my side bar and my content container. Also, does anybody know how to style called data from ssi.php in SMF forums? I want my login boxes to look like my main page. Thanks. Here is my css: Code: html { font: normal 12px verdana, arial; background-color: #000 } body { text-align: center } #fw-container { margin: 0 auto; width: 1000px; text-align: left } .hasSidebar #fw-container { width: 1000px; } a, a:visited { text-decoration: none; } a:hover { text-decoration: underline; } /* --- Header --- */ #fw-head { position: relative; height: 196px; background: #242424; } #fw-title { font: bold 26px verdana; letter-spacing: -1px; position: absolute; top: 20px; left: 20px; padding: 0; margin: 0; z-index: 10; } #fw-title a, #fw-title a:visited, #fw-title a:hover { color: #fff; } .fw-logo { width: 760px; height: 196px; position: absolute; } .hasSidebar .fw-logo { width: 1000px; } /* --- Navigation --- */ #fw-mainnavwrap { background: #242424; padding: 10px 20px; font-family: arial; font-weight: normal; border-top: 1px solid #000; border-bottom: 1px solid #000; } #fw-mainnavwrap ul { margin: 0; padding: 0; background: transparent; list-style-type: none; } #fw-mainnavwrap li { margin: 0px 15px 0px 0px; display: inline; } /* --- Content --- */ #fw-bigcontain { width: 760px; float: left; } .fw-paragraph { background: #242424 url('../Waveform/img/bg-p.gif') repeat-x top left; border-bottom: 1px solid #000; padding: 15px 20px 10px; overflow: hidden; } .fw-title { margin: 0px 0px 10px; font: 18px verdana; color: #fff; } .fw-text { margin-bottom: 10px; } /* --- Sidebar stuff --- */ .hasSidebar #fw-sidebar { width: 239px; float: right; font-size: 12px; clear: right; border-left: 1px solid #000; } #fw-sidebar .fw-title a, #fw-sidebar .fw-title a:visited, #fw-sidebar .fw-title a:hover { color: #fff; text-decoration: none; } #fw-sidebar .fw-title { font-size: 1.3em; font-weight: normal; } /* --- Footer --- */ #fw-footer { font: normal 10px verdana, sans-serif; background: #242424; margin: 0px; padding: 11px 0px 1px; color: #999; clear: both; width: 760px; } .fw-footertext { background: #161616; border-bottom: 1px solid #000; border-top: 1px solid #000; margin: 0px; padding: 6px 0px 6px 20px; } Hello, I have something has follows: <div> ... <table> ... </table> </div> My document font size is 1em. My div font size is 1.4em. What should be the font-size in my table to get back to the 1em of the document? Thanks, Miguel People viewing my site at 120 dpi are seeing misaligned text and layout, whereas people viewing the site at 96dpi can see it properly. I'm using "em" instead of pixels when setting font sizes in CSS. The site has fixed length and width, do I HAVE to allow it to resize itself? |