CSS - Superimpose An Image Over 960.gs Layout
Hi guys
I guess most of you know about 960.gs http://960.gs/ It is a tool I love, and I guess I won't leave for long time. I've begun doing a new layout, and now I'm facing a little problem. How can I put an image over the 960.gs layout? and to make everything crossbrowser, to validate, etc.? Look: my work + original image Thanks a lot in advance, Similar TutorialsWe've developed a webbased tool for somebody and placed their logo on the page. We want to superimpose a "Powered By" image on their logo image in the top right hand corner of the container. I am hoping there is a pure CSS way of doing this. It doesn't *appear* we can use absolute positioning since absolute coordinates is relative to the entire body of the page, and there is no way to determine the absolute coordinates since the page is centered in the body. If there was any way I can specify coordinates relative to the parent container, that would be great. Perhaps I could also use float, but that CSS property has always seemed hard to understand to me. Setting the logo to the background is not a good solution cause then logo height changes will not stretch the container properly. Currently the Powered By is placed above the logo. I just want to superimpose so it doesn't shove the entire page down. Example HTML: Code: <BODY> <CENTER> <TABLE cellSpacing=0 cellPadding=0 style="width: 740px"> <TR><TD style="text-align: right"> <IMG src="/images/powerdby.jpg" useMap="#powerdby" border=0> <A href="http://www.clientsite.com"><IMG src="http://www.clientsite.com/logo.jpg" border=0></A> </TD></TR> </TABLE> </CENTER> </BODY> I Want To Have It To Where I Can Use A Header Image At The Top, Then 2 Images for The Right And Left, And A Bottom Image. So Its Like A Box. But The Left And Right Need To Be Able To Repeat If The Text In The Middle Is Too Long. Any Help Would Be Appreciated! Thanks! ---- Heres My Code, it Works Until I Put To Many <BR> Tags And Make It To Long, It Messes Up The Left And Right Images CSS:: Quote: <style type="text/css"> .outerx2{ width:670px; margin-left:379px; border:0px solid #000; background:#D9D9CD url(left.png) repeat-y left top; padding-left:20px; } .innerx2{ background:#D9D9CD url(right.png) repeat-y right top; padding:1em 1em 1em 0; } /* mac hide \*/ * html .innerx2{height:10%} /* force "layout" in IE */ .outerx2 p{padding:0 10px;margin:0 0 1em 0} </style> Index.php:: PHP Code: <?php include'css.css'; echo'<Center><img src="top.png"></Center>'; echo'<div class="outerx2"> <div class="innerx2"> <p>This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: </p> <p>This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: </p> <p>This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: This is the content : This is the content: </p> </div> </div>'; echo'<Center><img src="bottom2.png"></Center>'; ?> Hi, I need to create a object like in the attached image (worldmap.gif). The image itself in not hot, just the text;s above it. When the user hovers over the text, two things should happen: 1- The corresponding image should swap with a darker version (Attached: img_continent_africa.gif etc) 2- and a dropdown menu should appear as shown in worldmap.gif. My question is: How should I approach this from a css layout perespective. How do I position the over-state images. thanks, Zain Hi, I'm developing a childrens story website, and ran into a problem with the layout in Firefox. Everything worked perfectly on my local server, but after I uploaded it to my hosting account I came across a strange problem. When I first go to the homepage everything looks, and works, fine. And if I refresh the page a few times, it still all looks fine. But if I click on the "Home" link a few times the whole layout breaks on every 3rd or 4th click of the home button. You can see the design at http://develDOTstephenhmDOTcom/bedtime/index.php. (Sorry for the link, but it's my first post and I can't add urls yet) This problem doesn't exist in IE7, just Firefox as far as I can tell. I know the rest of the sites layout is a bit messed up in IE7 at the moment, as I haven't gotten around to adding the IE7 only css info yet. I'm sure it's a stupid error on my part, but I was hoping somebody could point me in the right direction. Thanks a lot in advance to anyone who can help. For the image rollovers the basic html for each one is: <a class="happylarry" href="happylarry.php"> <div class="image_text"> Happy is an Irish Leprechaun who lives in the left-hand pocket of your child.<br /><br />And of course his real name is not 'Happy'. His real name is 'Larry'. But Larry Leprechaun is such a happy little fellow, and he gets up to so much mischief, that all of his friends and family call him 'Happy Larry'. </div> </a> and the relevant css is: a.happylarry { display: block; float: left; min-width: 222px; width: auto!important; width: 222px; height: 524px; background: url('images/happylarry.png') no-repeat 0 0; text-align: center; margin-right:13px; text-decoration:none; } a.happylarry:hover { background-position: 0px -524px; } .image_text{ color:#FFFFFF; max-width:180px; margin-left:25px; *margin-left:0px; margin-top:250px; text-align:left; font-size:12px; font-family: Arial, Helvetica, sans-serif; } Hi: I need a simple code for displaying two things side by side. I want to attach an image of what I need to do, but I can't figure out how to attach images. Basically, to describe the image, I need to have an unordered list on the left and a graphic on the right. These need to be between to blocks of text (above and below). I would prefer not to use tables. I am assuming there is a simple way to do that using <div> and <span> and floats, but I can't figure it out. Can someone please help. Thanks. Hi guys, I never wanna do anything simply... *sigh* Need some help again! I downloaded SPGM to use as a photo gallery. Love it. It's even valid XHTML 1.0 Strict! Ok, I've implemented it here . Instead of using the native CSS file that came with the script, I copied it all into my own CSS file. Well, not ALL of it, but most. That CSS file is here . Towards the bottom, you'll see the SPGM CSS section. Now I've already started adapting the script and layout to my site, but as you can imagine, it's not too easy, especially for an only moderately-knowledgeable CSS user like me. First thing I want to do it... 1. I want to move the entire table (the main table containing the 4 folder icons and text) over to the left so the left side of the table lines up only a pixel or two right of the line between the green and tan on the left. I can shift the whole table by adding margin-left: -something px; to TABLE.table-wrapper, but the folder icons actually disappear as if they go behind something! HUH? I think moving this to the left more will solve the problem in IE of the right nav links getting pushed down... Could be wrong, but it's ok in FF. If someone could start me off with this I'd very much appreciate it. Thanks, guys! Chris CSS back ground image isn't showing at all. Tried everything, googled, flipped through CSS books, moved the image into different directories, drank more tea and finally flipped Help! Site link : http://weary.me.uk/MT/ Code: * { margin:0; padding:0; } BODY { background-color:#FFFFFF; font-size:12px; } #header { background-color:#FFFFFF; padding:0px; } #left { float:left; width:18%; padding:0%; margin-left:1%; margin-top:0%; } #right { background-image: url(right_background.jpg); background-repeat: no-repeat; margin-right: 20px; width: 220px; border:1px solid #d2d7e4; float:right; width:20%; margin-right:0%; margin-top:0%; padding:0px; } #center { margin-right:30%; margin-left:14%; padding-left:10%; background-color:#FFFFFF; } #footer { clear:both; background-color:#FFFFFF; padding:8px; } I want an image gallery like this one: http://www.webreference.com/program...ples/twelve.htm only I want the thumbnails to appear in a single line, UNDER the image. There would be far fewer thumbnails so it would only be about 300px wide, but I want the image to appear above, and not to the left. I tried messing with the values but now I'm confused and I don't want to mess with values that don't need to be messed with 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 have been trying to figure out how to achieve this layout with css for about an hour. I'm sure it is something very simple that I am missing. Can anyone help? It looks like the image at the address below. tophermorrison.com/css_layout.jpg I have 3 divs 1.banner (100px tall 100% wide) 2.content (100% tall 650px wide) 3.image (100px x100px) I want the image to stay relative with the content and the content to be centered. The image should be 0 from the top and centered over the right edge of the content. Is this possible? Hi, I have a background image that I want to incorporate into the header div of a fixed width layout. The header is of a gradient style - on the left it is a solid color and as you move along towards the right it fades to white. The image is 981x76. If I bring it into Gimp, I can scale it to 1920 x 76 and it looks the same. I would like to be able to do that in a div tag, with the image as a background. I would like the image to scale horizontally just like I can do using Gimp. Is this possible? Basically, I want the browser to manage the scaling of the image. Hello, I am using an OS Commerce layout for a client's website. On this page - www.mts-diesel.com you will see how I have the homepage laid out in anticipation of design, with 3 divs of varying colors. One div with an id of #hp_left is where I want to put a nice jquery code. But when I insert that into #hp_left it breaks the whole layout, was seen here www.mts-diesel.com/index2.php I'm not sure what in the css in the code for this script is breaking my layout but Ithought someone here might be willing to shed some light. A big thank you. Tom I am working on the new home page which is based on a template. The left sideColumn is working fine, however I am having a few problems with the mainColumn layout. Here is a static image to show what I want it to look like Here are the problems I am having: 1) The #scroll box is place where I want it in IE but in foxfire it is right up against the left side of the #sideColumn partially hidden. There will be text that scrolls into this box and stops. I haven't started on the part yet - in case that makes a difference. Not my choice, but that is what the bosses want. 2) I want the image centered horizontal within the #mainColumn. Here is what I have for the css: #home img { margin: 5px auto 5px auto; } which I thought would do the trick, but it's not. 3) I want the p text to have a 40px margin on the right and left side like the .large does. Here is what I have for the css: #home p, .large { margin: auto 40px auto 40px; } It works for the .large (Welcome to Vitalograph), but not for the text below it. At one point I had it working, but after addtional changes fixing other problems, now it doesn't and I can't figure out why. Here is the xhtml starting at the 2 column part (wrapper): Code: <!--begin wrapper--> <div id="wrapper"> <!--begin side column --> <div id="sideColumn"> <span class="category">Products</span> <ul> <li><a href="/products/spirometers.html">Spirometers</a></li> <li><a href="/products/clinical_trials.html">Clinical Trials</a></li> <li><a href="/products/asthma_copd.html">Asthma & COPD</a></li> <li><a href="/products/smoking_cessation.html">Smoking Cessation</a></li> <li><a href="/products/resuscitaion.html">Resuscitation</a></li> </ul> <span class="category">Resources</span> <ul> <li><a href="/resources/contact_us.html">Customer Support</a></li> <li><a href="/resources/training_services.html">Training & Services</a></li> <li><a href="/resources/exhibitions.html">Exhibitions</a></li> <li><a href="/resources/newsletters.html">Newsletters</a></li> <li><a href="/resources/downloads.html">Downloads</a></li> <li><a href="/resources/useful_links.html">Useful Links</a></li> <li><a href="/resources/industry_information.html">Industry Information</a></li> <li><a href="/resources/industry_information.html">Sitemap</a></li> </ul> </div> <!--end of side column --> <!--begin main column --> <div id="mainColumn"> <!-- InstanceBeginEditable name="Main_Section" --> <div id="home"> <div id="scroll"><span>scrolling news will go hear and stop</span></div> <img src="/images/boys_bubbles.gif" width="485" height="333" alt="boys and bubbles" /> <span class="large">Welcome to Vitalograph</span> <p>Vitalgraph offers a wide range of spirometers along with other asthma management equipment with over 40 years experience. From simple hand-held units to sophisticated Windows based spirometry systems, we have it all. Check out our full line of respiratory equipment under the product category.</p> <p><a href="/about_us/about_us.html">more about us...</a></p> </div> <!-- InstanceEndEditable --> </div> <!--end of main column --> </div> <!--end of wrapper--> Here is the vitalograph_master.css: Code: body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; text-align: center; background-color: #ffffff; color: #515151; margin:0px; padding:10px; } /*page container settings*/ #page { width: 750px; height: 600px; border: 1px solid #5094F9; background-color: #FFFFFF; overflow: hidden; margin: auto; padding: 10px 10px 10px 10px; text-align: left; } /*logo header and tag settings*/ #header { margin: 0; padding-bottom: 5px; width: 450px; height: 36px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; text-align: left; } #header img { vertical-align: -7px; } .tagline { color: #5094F9; font-size: 16; font-style: italic; font-weight: bold; display: inline; clear: both; line-height: 20px; margin-left: 10px; } /*top bar settings*/ #topbar { float: top; height: 20px; background-color: #5094f9; clear: both; padding-left: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:link, #topbar a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:hover, #topbar a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #topbar ul { list-style: none; margin: 0; padding-top: 2px; } #topbar li { display: inline; margin-right: 160px; } /*Main Section two columns under top section*/ #wrapper{ padding: 10px 10px 10px 0px; width: 100%; height: 100%; } #sideColumn { float:left; width:155px; height: 78%; background-color: #5094F9; padding-top: 50px; padding-left:10px; padding-bottom:10px; pading-right: 10px; margin-right: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-weight: bold; line-height: 20px; } .category { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 16px; font-weight: bold; letter-spacing: 5px; } #sideColumn a:link, #sideColumn a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #sideColumn a:hover, #sideColumn a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #sideColumn ul { list-style: none; padding: 15px 0px 15px 10px; margin: 0px; } #mainColumn { padding: 0px; } /*footer*/ .footer { font-family: "Times New Roman", Times, serif; font-size: 9px; color: #999999; } /*text*/ .large { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; font-size: 18px; font-weight: bold; margin-bottom: 15px; } Here is the home.css: Code: /*home page*/ #home { margin: auto; } #home img { margin: 5px auto 5px auto; } #home p, .large { margin: auto 40px auto 40px; } #home a:link, #home a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #home a:hover, #home a:active { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #990099; font-size: 12px; font-weight: bold; } #scroll { width: 560px; padding: 5px; background-color: inherit; border: 1px solid #5094F9; margin-bottom: 5px; } Any help or suggestions are greatly appreciated. Hi there and thanks for reading & helping! I am new to this site, but here is my question: I need to build about a 20 page website. I have been told I should do the "layout" for each page using CSS. Is it possible for each page to "link" to one CSS file for layout instructions? I have found suitable CSS layout templates but am unsure how to link each page to the external CSS file for a basic "header, 2 column, footer" layout, or if it is even possible? Hi, I am relatively new to CSS and am trying to come up with a layout very similar to Noteableapp. What I like about that design is that the taskbar stays floated at the top, while the central column exands with the width of the browser. What I'm trying to do different is have a much more detailed background image, rather than a simple gradient. The problem I'm having is that the navigation divs seems to be transparent so the detailed texture shows through. I've tried building the divs from scratch without success as I can't seem to get the central column to stay in the centre of the page, so I had a look at the css for Noteableapp however its a bit complicated for me and raised more questions than answers! Can anyone point me in the direction of a good tutorial to achieve a layout similar to Noteableapp or able to contact me and guide me through what is actually happening with the noteable css. My preference would be a tutorial so I can actually understand what is happening but any help would be much appreciated. My layout is pretty simple. 1 large columb in the center that should extend the full length of the browser(minimum) regardless of how much text is in it. 1 column on either side of it for other content. I cannot get the middle column to extend to 100%. it stops at the data. Here is my CSS. Code: body { margin: 0; padding: 0; font-size: 12px; font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Lucida, Geneva, Helvetica, Arial, sans-serif; background-color: #C10E0E; } #leftcolumn { display: inline; float: left; left: 15%; width: 150px; } #centercolumn { float: left; width: 511px; height: 100%; margin-left: 2px; padding: 8px; border-left: 1px solid #494949; border-right: 1px solid #494949; background: url(/images/bg.png) no-repeat top left; background-color: #FFDCAA; } #rightcolumn { float: left; width: 150px; margin-left: 1px; } #mainnav { width: 150px; padding: 0 0 0 0; font-size: 12px; font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Lucida, Geneva, Helvetica, Arial, sans-serif; background-color: #C10E0E; color: #FFDCAA; } #mainnav ul { list-style: none; margin: 0; padding: 0; border: none; } #mainnav li { margin: 0 0 0 0; border-left: 7px solid #C10E0E; padding: 0 5px 0 0; } #mainnav li a { display: block; height: 15px; vertical-align: middle; padding: 0 0 0 0; margin: 0 0 0 0; background-color: #C10E0E; color: #FFDCAA; text-decoration: none; text-align: right; } html>body #mainnav li a { width: auto; padding: 0; margin: 0; } #mainnav li a:hover { background-color: #C10E0E; border-left: 7px solid #FFDCAA; color: #FFF; padding: 0; margin: 0; } #mainnav h3 { padding-left: 5px; font-size: 14px; font-weight: bold; color: #F6D4A4; font-style: italic; } thanks! I am having a hard time grasping this and would really appreciate some help. I think if you look at this code, my problem is obvious. I want a layout with a nav column down the left side, a banner area, and a content area. I have played around with this for hours, tons of trial and error. I almost had it in IE, but in NS it looks like crap. Also, in the container <div> that someone kindly gave me, what is the -350px do? Here is my code, thanks so much. <!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> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> <title>Full Height</title> <style type="text/css"> /*<![CDATA[*/ body { height: 100%; margin: 0; } #container { position: absolute; top: 0; left: 50%; margin-left: -350px; width: 700px; height: 100%; background-color: #fff; border: 1px solid red; background-image: url('images/keybg.jpg'); background-repeat: no-repeat; } #nav{ width:135px; position:absolute; background-color:#000; left:0px; height:100%; float:left; clear:right; top:0px; margin-top:0px; } #banner{ width:565px; position:absolute; background-color:#f00; left:135px; height:125px; float:right; } #content{ width:565px; position:absolute; margin-top:125px; background-color:#00f; left:0px; height:100%; float:right; clear:left; } /*]]>*/ </style> </head> <body> <div id="container"> <div id="nav"> </div> <div id="banner" </div> <div id="content"> </div> </div> </body> </html> So I'm trying to get a semi-liquid layout that has the side benefit of allowing the HTML page content to be organized in a way that losing the stylesheet won't kill it. Ideally, the HTML page would be: LOGO BREADCRUMBS CONTENT MENU RIGHTSIDE CONTENT FOOTER Unfortunately, I've had to move the rightside content up in the page order since I can't seem to configure my CSS in a way that makes it work the other way. This is as far as I've gotten, and I can't get the footer to properly begin at the end of the longest element. I know it's a side effect of the absolute positioning of the Logo and Menu, but I can't think of a way to layer this stuff any better. Help! If you can help me get this up and running, I'll be sure to thank you and hit you back with a link on my site when it's done. Since I can't link directly to anything yet, here's the image of what the layout should look like. I want the footer to fall under the scroll bar if there is one, I don't want a ever-present footer. Code: www.ctechsinc.com/temp3/mockupb.gif Code: * { padding-left: 0px; margin:0px; } table { border-collapse:collapse; } img { border:none; } #container { width:100%; } .logo { float: left; height: 260px; width: 200px; background-color: #0099CC; } .menu { background-color: #996699; width: 200px; height: 150px; float: left; position: absolute; top: 260px; left: 0px; } .greenwrap { background-color: #006633; margin-left: 230px; margin-top: 10px; /* this can be deleted once implemented; it's only here to help align things */ } .breadcrumb { background-color: #99CCCC; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .content { min-width:220px; height:100px; background-color: #00CCCC; float: left; } .contentwrap { background-color: #00FF99; float: left; } .sidebar { width: 200px; background-color: #3399FF; float: none; right: 0px; position: absolute; } .box1 { background-color: #00FFFF; min-width:220px; margin-top: 20px; margin-right: 220px; margin-bottom: 20px; margin-left: 20px; } .qlink { margin: 20px; } .footer { margin:0px; width: 100%; float: left; clear: none; } Code: <html> <head> <link href="screen2.css" rel="stylesheet" type="text/css"> </head> <body> <div> <div class="logo"> Logo </div> </div> <!-- content, RH --> <div> <div class="greenwrap"> <div class="breadcrumb"> <h1>BREADCRUMBS</h1><br> </div> <!-- <div class="content"> --> <div class="contentwrap"> <div class="box1"> <h2>heading!</h2> <p>Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. </p> </div> <div class="box1"> <h2>heading!</h2> <p>Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. </p> </div> </div> <div class="sidebar"> <div class="qlink"> <p>boring content boring contentboring content boring contentboring content boring contentboring content boring contentboring content boring content </p> </div> </div> <!-- </div> --> </div> <div class="menu"> <p>Menu</p><p>Menu</p><p>Menu</p> </div> <div class="footer"> <p>Fooooooooooooooooooooooooooooooooooooooterrrrr!</p> </div> </div> <!-- menu --> </body> </html> |