CSS - Trouble With Picture Positioning
I have a 3 column layout: 1st -> 350px, 2nd -> 500px, 3rd -> remainder of containing div.
In the 2nd div, I have 15 pictures arranged to form the letter R, each picture is 100x100 px. I am not using absolute positioning. I want the first and second column to have a background color of black that is 100% the height of the viewport. The middle column should have a white background and be 100% height. The problem is, the margins I am using for the pictures is throwing things off and I'm not sure how to fix it short of not arranging the pictures the way I want. Is there another way to arrange them to achieve the R shape? Code: <div id='container'> <div id='first'></div> <div id='second'>All of the images are loaded here.</div> <div id='third'></div> </div> Code: #img1, #img2, #img3, #img4, #img5, #img6, #img7, #img8, #img9, #img10, #img11, #img12, #img13, #img14, #img15, #img16, #img17, #img18, #img19, #img20 { display: block; border: 3px solid #B8860B; width: 100px; height: 100px; } #img1, #img2, #img3, #img4, #img5 { margin-left: 10px; } #img1 { margin-top: 60px; } #img2 { margin-top: 10px; } #img3 { margin-top: 10px; } #img4 { margin-top: 10px; } #img5 { margin-top: 10px; } #img6 { margin-top: -590px; margin-left: 125px; } #img7 { margin-top: -136px; margin-left: 240px; } #img8 { margin-top: -76px; margin-left: 355px; } #img9 { margin-top: 10px; margin-left: 380px; } #img10 { margin-top: 10px; margin-left: 355px; } #img11 { margin-top: -87px; margin-left: 240px; } #img12 { margin-top: -125px; margin-left: 125px; } #img13 { margin-top: 30px; margin-left: 305px; } #img14 { margin-top: 10px; margin-left: 365px; } Similar TutorialsI have the following page. I need the image and all the ajax to be centered on the page, no matter how the user resizes it. I've tried several different methods, but it always seems to screw up the positioning of the ajax buttons. In the header section design, I have three parts. Menu; upper left, gallery; lower left and Logo right. So in my stylesheet, I created three parts. The problem I am having is logo is not centered as in the design (check the attachment). I could not figure why not. Looking for suggestions. http://www.refinethetaste.com/AT/ I'm having trouble with creating a nav bar in css. The code I'm using is this for the html: Code: <div id="wrap"> <div id="nav"><a id="home" href="#" title="home"><span>home</span></a> </div> </div> <div id="bottom"></div> </div> and this for the css: Code: @charset "utf-8"; /* CSS Document */ body { overflow:hidden; padding:0; border:0; margin-left:50%; color: #000000; line-height: 100%; font-family: verdana; font-size: 12px; text-indent: 0cm; background-image: url('bg.png'); background-position: top center; background-attachment: fixed; background-repeat:repeat-x; } #bottom { position:absolute; height:100%; width:100%; background-image:url('lbg.png'); background-position:bottom center; background-attachment:fixed; background-repeat:no-repeat; margin-left:-340px; } #wrap { background-color: #FFFFFF; border-color: #660000; border-style: double; position:absolute; width:900px; height:750px; margin-left:-450px; } #nav { height:50px; } #home { display: block; width: 226px; height: 50px; background: url("home.gif") no-repeat 0 0; } #home:hover { background-position: 0 -50px; } #home span { display: none; } The button shows up but only half the link works! And I have put in other bottons to the right of it and they don't work at all... can anyone help pls? thank you. Im having issues positioning a div that contains a background image. The idea is to have the image positioned in the lower right hand corner of the screen. I get it there, but then the problem is that the image floats to the height of the div it contains. i need it to just be in the bottom right hand corner. how can I do this? here is the page, im so embarrased to have to ask this but i swear, the CSS people could not have made this more confusing if they tried. http://www.doublethinkdesigns.com/main.php Hello! I'm hoping someone can help me out here. I'm sure it's something simple I'm overlooking, but I've trialed-and-errored it enough and it's time to seek help! I'm trying to adjust the location of the "main menu" on this page he http://www.jeditemplearchives.com/hasbrodb/welcome.php Currently, it is set in reference to the side of the browser in this CSS code: Code: .menuContainer { position: absolute; top:113px; right:210px; margin: 10px; margin-top: 50px; } I've tried making the position relative but it really whacks out the page when I do that. I want to make it relative to the border of the content so that no matter what size resolution or if the browser is minimized it stays fixed and doesn't float left. I was able to do this to the links directly above it, but the same thing doesn't seem to work for this. Here's the code for the 'advanced' and 'login' links: Code: #header ul.headerLinks { list-style-type: none; margin: 0px; padding: 10px; position: absolute; right: 0px; top: 95px; white-space: nowrap; } Thanks for any suggestions anyone comes up with! I've been developing a content management system, and one of the final things I have to clean up is a stylesheet problem involving the float property. I'm trying to position two boxes next to each other id: menu and id: content, but until I set the width property on content it would drop beneath menu. I want the content box to fill any remaining space to the right of the menu, with appropriate padding and spacing and such. Can anyone help make suggestions as to the best way of achieving this? Here is some of my css code which is also viewable on the website which is located at: 8< snip >8 Code: #container { margin: 1em 4em 1em 4em; /* width: 750px; dynamic width */ text-align: left; background: #FFFFCC; border: 2px solid black; } #menu { float: left; margin-top: 20px; margin-bottom: 20px; margin-left: 20px; margin-right: 20px; font-family: Verdana; font-size: 12px; width: 150px; display: inline; } #content { float: right; width: 20em; margin-top: 0px; margin-right: 20px; margin-bottom: 0px; /* margin-left: 170px; */ padding-top: 5px; padding-left: 20px; padding-bottom: 20px; border-left: 2px solid black; height: 100%; } Thanks for trying to help, I've been getting really frustrated trying to get css to work in both ie and firefox. BTW: I've been finding the Web Developer firefox extension very helpful for this kind of work. I have a problem that I've been wrestling for the past hour and a half, and I've come to the conclusion that I will most likely never solve it on my own, so here I am. I have a header area of a website. It has a logo(basically the name of the website in a fancy font). The logo is in the bottom-left area of the header. I also have a banner. This banner can be anywhere from 468x60 to 728x90 pixels in dimension, depending on user input from a back end. I want the banner positioned near the bottom-right of the header, with a bit of space in between it and the right edge of the browser window. I'm having a lot of trouble accounting for the varying banner sizes. I can't use margins and floats to position the banners because the banner image size changes, therfore I thought it would be a good idea to use absolute positioning (relative to the header). This works perfectly, except when I resize the window, the banner overlaps the logo image. So, I guess I can't use absolute positioning. My HTML is: Code: <body> <div id="header"> <div id="header_ads"> <?php display_banner() ?> </div> <h1 id="heading"><span class="invisible">This is the heading</span></h1> </div> </body> My CSS is: Code: * {margin:0;padding:0;} body {width:100%} .invisible {visibility:hidden;} /*Header*/ #header {margin-bottom:3em;background-color:rgb(80, 80, 82);padding:0 0 0.2em 0;height:8em;width:100%;position:relative;} #header #heading {background:url("../images/logo.jpg") no-repeat;height:70px;width:400px;position:absolute;top:1.6em;left:1em} #header_ads {float:right;margin-top:-1.5em;margin-right:1em;position:absolute;bottom:0.3em;right:4em} The above CSS/HTML yields the exact desired result, but does strange things when the browser window is resized... I would greatly appreciate any help! Hey guys, Here's my problem: http://www.3rdcoastpc.com/moonstoys/ Basically I want the menu in the rounded rectangle area, not underneath (outside) of it. You can see what's happening in the URL. If I use a span tag instead of a div in the head_content class, the background (the right corner of the rounded rectangle) doesn't show. I'm not sure what's going on here because in my HTML I'm putting the <ul> tags right after the logo image, so I would think that it would sit next to the logo and not underneath it. I'm just confused as this is my first attempt at doing a tableless design. Here's my css: http://www.3rdcoastpc.com/moonstoys/main.css and the HTML: http://www.3rdcoastpc.com/moonstoys/index.html Thanks in advance! Dustin I have problem with footer DIV in this layout (the order of DIV's in code after <body> should be - content, left, right, right2, header, footer - positioned centraly with fixed values): It needs to be sticked to fit after content of 4 column DIV's like it is in example. http://www.split.info/dev/less-content/ http://www.split.info/dev/more-content/ Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Title of website</title> <style type="text/css"> <!-- body {margin: 0px 0px 0px 0px; background-image:url(images/bg.jpg); background-position:center; background-repeat:repeat-y;} #wrapper {width: 1000px; margin: 0 auto; text-align: left; position: relative;} #contentPane {width: 468px; float: left; position: absolute; margin-left: 3px; padding: 0px 0px 0px 0px; background-color:#0099FF; left: 126px; top: 150px;} #leftPane {width: 125px; float: left; left: 0px; position: absolute; background-color: #99FFFF; top: 150px;} #rightPane {width: 173px; float: right; right: 226px; background-color:#999966; position: absolute; top: 150px;} #rightPane2 {width: 220px; float: right; right: 0px; background-color:#99FF00; top: 150px; position: absolute;} #headwide {background-image: url(images/head_bg.jpg); background-position: center; background-repeat: no-repeat; width: 100%; height: 142px; position: absolute; top: 0px;} #header {margin: 0pt auto; width: 1000px; background-color:#CC6600; height: 142px; } #footer {position: absolute; width: 100%; top: auto; bottom: 0px; background-color: #CCFFCC; height: 50px;} --> </style> </head> <body> <div id="wrapper"> <div id="contentPane">Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> </div> <div id="leftPane">Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> </div> <div id="rightPane">Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> </div> <div id="rightPane2">Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> </div> </div> <div id="headwide"> <div id="header">Header area</div> </div> <div id="footer"><strong>Content from above 4 column div's need to push footer DIV below (after them)! </strong>Footer area that is on bottom of div with biggest height (content, left, right or right 2 pane)... foooter follow right after end of content from those div's (regular behaviour of next table row below any of those 4 columns). Current state like it is in this document happens that if you add more data f.i. in content area (outside one screen), it will go trough footer... So footer can be either moved in code after rightpane2 div after end of wrapper. Pls help. Thx!</div> </body> </html> Content from above 4 column div's need to push footer DIV below (after them)! Foooter need to follow right after end of content from those div's (regular behaviour of next table row below any of those 4 columns). Current issue like it is in this layout happens that if you add more data f.i. in content area (outside one screen), it will go trough footer... So in your resolution footer can be also moved in code after rightpane2 DIV, after end of wrapper. Pls help. Thx! Echo I am trying to add a border to my pictures. I read a tutorial about it but however in firefox it escapes from the box. In IE it looks fine. Has anyone had this problem before? Any tips on fixing it? Thank you here is the link http://www.conceptofgravity.com/test/pictures_test.html Hey all, I've got a gallery of sorts, where teams register and they show up with a thumbnail and team info. You can see what I'm talking about here. In FF, the first team on each page's box drops down to the end of the floated form on the right. I'm sure it's something to do with the floated element, but I can't seem to fix it. It displays the way it's supposed to look in IE7 (note I didn't say 'properly', as i'm sure that's not true). Here's the CSS: Code: .teamBox { width:400px; margin:5px auto; min-height:200px; background:white url(images/teamBox_tile.gif) repeat-y center; } * html .teamBox { height:200px; } .teamBox h3 { margin:0; width:390px; height:27px; padding:12px 0 0 10px; background:white url(images/teamBox_top.gif) no-repeat top center; border-bottom:1px solid white; color:white; } .teamBox p { color:#333; margin:5px 15px; } .teamBox p a { color:white; } .teamBox .teamBoxBottom { width:400px; height:10px; background:white url(images/teamBox_bottom.gif) no-repeat bottom center; } .teamThumb { float:right; width:150px; height:150px; margin:5px 10px; overflow:hidden; } i have a screenshots page on a website for a peice of software i've written. it has a number of thumbnails on it, when you click a thimnail, the full size image pops up in a new window. <a href="javascript: void window.open('fullSize.jpg', 'pic1', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=660,height=500');"><img src="thumbnail.jpg" width="120" height="90" border="0"></a> i want the thumbnail to have an orange (#EE9515) border, bossibly 4px thick, when the user hovers over it. how do i do this? I have a picture of a city.. then i have transparent pictures of stores and stuff i want to layer ontop of the city.. but i was wondering if someone could go about showing me how to layer them? i found help on layering pictures, but they wont show through to the city.. =/ My site is a .org that I recently created and I am having picture problems. For some reason that i cant under stand the picture wont link up to my menue as a sub menue and adjust the spacing and type like it does with the regular menu. Ideally I would like to modify it so it is random pick from a file on the server but IDk how and advice on how to make it not cut off my text or have my text over lap it. The site is my name IGADA dot org any suggestions. Really what I need to now is if i should be trying to make this happen in the CSS or in the HTML. I can post the relavent CSS if some one wants me too. [http://]blumoney[dot]latestdot[dot]net[/]plb[/]pictures[dot]php You see? I want the thumbnails to pile up underneath the full sized image. the text on the left of the picture goes "in" a little bit to the image as can be seen he in firefox. http://www.925-sterling-silver-jewe...ls.php?id=sl211 in IE its ok but its in middle! and yeah i know my css is lacking but i plan to do it all in css once i finish my implementation (php) PHP Code: <div style="float:left; position: relative; width: 255px; height: 215px; z-index: 1; left: 5px; top: 5px" id="layer1"> <img border="0" width="255" height="215" src="images/<?php echo $product; ?>.jpg" > </div> <h2><span style="text-indent:0.5in">Detailed Information</span></h2> <b>Weight:</b> <?php echo $row['weight']; ?> <br/><? if($row['category'] == Anklets) { ?> <b>Diameter:</b><?php echo $row['diameter']; } else if($row['category'] == Bracelets) { ?> <b>Diameter:</b><?php echo $row['diameter']; ?> <br/> <b>Width:</b><?php echo $row['width']; } else if($row['category'] == Necklaces) { ?> <b>Width:</b><?php echo $row['width']; ?> <br/> <b>Length:</b><?php echo $row['length']; } else if($row['category'] == Sets) { ?> <b><span style="color:red">not sure</span> <? } Hello, please take a look at http://www.inbalancepilates.ca/india.html I've been trying to figure out why there is a purple border around the images. There's nothing in the CSS that's doing this, and none of the cells have borders. Any help would be great, thanks! When I setup a td and table to include a photo and I want the photo to "hug" all four sides of the td I just specify cellpadding and cellspacing = 0 within the table. then make sure the </td></tr></table> comes right after the img tag with no spaces or breaks. However I cannot seem to duplicate this in css. No matter what I do there's always a 1-2 pixel space between the photo and the border of the td. any thoughts?? I've looked up and tried to use every paramater I can find. Dear All, I have the following issue with the CSS solution (2). Everytime I move the cursour over the pic it flashes 1.) If I display a picture/link like this .. it doesn't flash: <a href="www.aaa.com"><img src="pic.gif" alt="" border="0" style="float: left; width: 250px; height: 163px; margin: 0 1.5% 0;" /></a> works fine! 2.)Now doing it via CSS: <a href="www.aaa.com" id="mainpic"><span>Test</span></a> #mainpic { float: left; width: 250px; height: 163px; margin: 0 1.5% 0; text-decoration:none; background:url('pic.gif') no-repeat; border:medium none; display:block; } #mainpic span { visibility:hidden; } Would be very nice if somebody could tell me what I'm doing wrong. Thanks a lot in advance Jack How to add a background picture to a table? Anyone helps? Thanks in advance. |