CSS - Gamebox: Image With Valign Middle But Floating? Anchored Div?
i want to have organized game boxes. the way i want it organized is for the image to be on the left, and the text to the right of the image.
however, i want the image to be in the vertical middle of the div and the text to also be in the vertical middle. the problem with what i have now is that the image is always at the top of the game box div and so is the text. ALSO, i want the WHOLE GAMEBOX to act as an <a>, and not just the image and the game title. is that possible? Code: if ($a == 2) { echo " <div class='gamebox clearboth floatleft halfwidth'>"; $a = 0; } else { echo " <div class='gamebox floatleft halfwidth'>"; } $a++; $game['desc'] = str_replace("'", "'", $game['desc']); $game['desc'] = "<span class='gdesc'>".$game['desc']."</span>"; $link = get_game_link("id="._sp($game['id'])); echo "<a href='".$link."' class='gamelink'>"; // display game echo " <div class='floatleft'> <img src='[imgdir]".$game['nameid'].".png' alt='Play ".$game['name']. "' title='Play ".$game['name']."' class='gamethumb' /> </div> <div class='floatleft wordwrap' style='width:75%'> <h3 class='nomargins'><a href='".$link."' class='gamelink'>".$game['name']."</a></h3>"; $rating = round($game['rating']/2); echo " <img class='nomargins' style='border: 0px' src='[themedir]/ratings/".$rating."stars.gif' alt='".$game['name']." Rating' />"; echo " <p class='nomargins'>".html_entity_decode($game['desc'], ENT_QUOTES); if (theme_is_admin()) { echo "<small>"; echo theme_admin_link("Manage Games", "darklink", "games", "manage"); echo " - "; echo theme_admin_link("Edit This Game", "darklink", "games", "editgame-form", "id=".$game['id']); echo "</small>"; } echo " </p> </div> </a> </div>"; Similar TutorialsHi everyone, I have a problem I'm trying to overcome with displaying an image next to the text in a table cell. I've set the table cell to valign=middle and this achieves the layout I want (hopefully this demonstration will look right..) Code: PICTUREHERE PICTUREHERE PICTUREHERE The text goes here PICTUREHERE PICTUREHERE So the text and the picture are laid out along the middle of the cell. However as soon as the text gets too big for the cell (or the cell gets smaller) this happens: Code: PICTUREHERE PICTUREHERE PICTUREHERE The text goes here, but when it's longer PICTUREHERE PICTUREHERE the remainder comes here I knew this to be because the img is still an inline element in the cell. I tried to solve the problem by making the img float:left, but the following happens, even if the valign=middle property is set in the cell: Code: PICTUREHERE The text goes here, but when it's longer PICTUREHERE the remainder comes here PICTUREHERE PICTUREHERE PICTUREHERE Is it possible to achieve the top layout. If it is can someone help me please (it's probably staring me in the face) Thank you in advance Andy so i got theese spans you see he < | Detail Panel | Detail Panel | > theese spans are in the div with a border now i want to position theese spans vertically centered on the top border like image below can someone show me how to acheive this. i have a cheap method but it gets messed up if the user changes font size. i used position and top but if the user changes the text size via the browser it throws it off. i was hoping for a way that keeps them vertically centered no matter what the font size, at least on page load. img.photobucket.com/albums/v135/noitidart/cssfloat.gif thanks very much its urgent I wish to place a small image with a caption by its side in the middle of a div. What would be the better approach, (i)to put the two in a div and use absolute positioning or (ii)to use margins to position the two. Either way seems to work but I am looking for an approach that would be considered correct by a professional web developer. All help would be greatly appreciated. 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> <style type="text/css"> body { text-align: center; min-width: 1044px; margin: 0px; padding: 0px; font-family: arial; } #wrapper { position: relative; text-align: left; width: 1044px; height: 100%; margin: 0px auto; } #top-header-block { width: 1010px; height: 170px; background-color: cyan; } #top-header-block img { height: auto; width: auto; } #logo { float: left; } /*------------------------------------------*/ #inner-div { height: auto; width: auto; position: absolute; left: 567px; top: 41px; } #inner-div img { float: left; } #inner-div p { float: left; margin-top: 3px; margin-left: 5px; color: #0d2474; font-family: arial,sans-serif; font-size: 11px; font-weight: bold; } /*------------Alternative to above-------------*/ #img-B { float: left; margin-left: 315px; margin-top: 40px; } #top-header-block p { float: left; margin-top: 43px; margin-left: 5px; color: #0d2474; font-family: arial,sans-serif; font-size: 11px; font-weight: bold; } /*------------------------------------------*/ </style> </head> <body> <div id="wrapper"> <div id="top-header-block"> <a href="#"> <img id="logo" src="" alt="" width="248" height="65"/></a> <div id="inner-div"> <a href="#"> <img src="" alt="" width="66" height="20" /></a> <p>: 0 items</p> </div> <!-------------Alternative to above--------------------------------> <a href="#"> <img id="img-B" src="" alt="" width="66" height="20" /></a> <p>: 0 items</p> <!-----------------------------------------------------------------------> </div> </div> </body> </html> This is what i want and it just doesn't work: Quote: TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT IMG TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT Hmm hopefully you get what i'm saying cause it really looks bad here so i have something like this: Code: <p>text ...... <div .. ><img...>/<div> text text </p> The text loses the formatting... Thanks. I have an image and to the right of it I have text. I want the text to be aligned veritcally to the middle of the image. I can do the following and it works: Code: .icon {vertical-align: middle;} <a href="index.php"><img src="images/icon.png" class="icon" border="0" /></a> Header Goes Here However, if I wrap H1 tags around "Header Goes Here" the text drops below the image. Any ideas on how to use header tags and have it aligned? I know I could make the icon as a background with H1 but I want it to be clickable. Is there any way to make it so the H1 Hi, I want to repeat a background image (actually, its just a colour) from 50% of the page. i.e. I want one side of my site to be of blue background (the left 50%) and the other side to be of grey background (the right 50%). | Blue | Grey | | Blue | Grey | | Blue | Grey | | Blue | Grey | So let's say the background of my site is blue all over. Code: <body> <div id='greybg'> </div> </body> But the particular div is set to something like: Code: #greybg { background-image: url("../images/body/greylong.gif"); background-repeat: repeat-x; background-position: 50% 0%; } This code doesn't work though. The repeat-x property makes it repeat all throughout, whereas what I want is for the image to repeat STARTING FROM 50% of the middle of the page (i.e. the second 50% column of the page). Any way I can achieve this? TIA I'm trying to do something like this: div#box { position: absolute; top: 100px; bottom: 100px; } ..so that the box anchors to the top and bottom no matter what resolution you're in. It works fine in Firefox. Any ideas for ie? javascript or anything. Thank you i have images, but i have this Code: * a { text-decoration:none; font-weight:bold; color:#665637; } * a:hover { color:#B39760; border-top-style: double; border-top-width: 1px; border-top-color: #665637; } and my anchored images take on the hover property. how can i stop them from doing this and just stay as they were? Hi, I'm getting very frustrated trying to float in image to the right and vertically aligned in a TD cell. This is a actually a vBulletin Forum Home Page and I want to display an image in the forum description. With the inline CSS below I keep getting a new line which I don't want. I want the text "Forum description goes here" with the image vertically aligned on the right hand side of the TD cell. Code: <td class="alt1Active" align="left" id="f34"> <div> <a href="http://www.myurl.co.uk/forums/test_forum/"><strong>Test Forum</strong></a> </div> <div class="smallfont"> Forum description goes here. <!-- *** THIS IS THE BIT I HAVE CONTROL OVER *** --> <div align="right" valign="top" style="float:right;"> <a href="http://www.myurl.co.uk"> <img src="http://www.myurl.co.uk/picture.jpg" style="border:0px;"> </a> </div> <!-- ****** --> </div> </td> I want "alternate views" text and thumbimage stand on the same line. I dont understand why the image moves a line below. Please advise. PHP Code: html: #product .productimage .thumb { float:left; width: 250px; border-bottom:1px dotted #ece7d1; } #product img#thumbimage { float:right; width: 16px; height: 16px; border: 0px; } css: <div class="thumb"> alternate views : <img src="http://www.refinethetaste.com/html/THEMES/default/images/pictures.png" id="thumbimage" /> </div> Ok the problem is hard to explain but here it goes: I have news items that are divs, inside that div i have a floating left image, then i have the news content. The problem comes when I view it in Firebird. It seems the next news item starts at the bottom of the floating image. This causes serious problems with the text. I tried this .clear css style: clear: both height: 0 line-height: 0 but it just seemed to help with one (bringing the second one below the bottom of the page). Does anyone know what might be the problem? Here is the link: http://www.cjweed.com/porttest As you can see IE displays everything like a champ, mozilla likes to mash it together. Please help Here's the html and css for http://www.pxgo.com/lifepak-prime.php - What I really need help with is aligning the footer (I know absolute positioning is bad for me, but relative doesn't work either) and floating my image (which for some reason vanished once I added the floatleft class). Thanks in advance for any help! Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML><HEAD><TITLE>Lifepak Prime</TITLE> <LINK rel="stylesheet" type="text/css" href="style.css"></HEAD> <BODY> <?php include ("include/head.txt"); ?> <?php include ("include/menu.txt"); ?> <div id="content"><h2>Lifepak Prime</h2><img class="floatleft" src="graphics/lifepak-prime.bmp" width="192" height="192" alt="Lifepak Prime" /> Lifepak Prime contains all the nutrition in Lifepak anti-aging formula <i>and more</i>. Add quality years to your life by providing the vitamins, minerals, and trace elements your body needs to protect and regenerate cells. <br><br>Lifepak Prime all-natural dietary supplements addresses the specific needs of men over 40 and post-menopausal women with BioGinkgo 27/7 extract (ginkgo biloba), milk thistle, glutathione, alpha-lipoic acid, coenzyme Q10, and grape seed extract. <br><br>Lifepak Prime provides 150 IU, or 500 % daily value, of vitamin E, increased levels of B6, B12, and zinc for optimal nutrition intake. Lifepak Prime also provides unique dietary components for bone health, as well as those that support memory and circulation. <br><br>My family uses Lifepak so I'll be happy to answer questions about Lifepak on the <a href="http://www.pxgo.com/discuss/viewforum.php?f=9">Lifepak message board</a>. We'd also love to hear from other people who are using Lifepak. <br><h2>Lifepak information</h2>Lifepak Prime is optimized for men over 40 and post-menopausal women. There is also a Lifepak for pregnant and lactating women (Lifepak PreNatal), Lifepak for woomen from 18-menopause (<a href="lifepak-women.php">Lifepak Women</a>), and adults from 18 to 40 (<a href="lifepak.php">Lifepak anti-aging formula</a>). <br><br>Lifepak is a vitmain, mineral, phytonutrient supplement. Lifepak is much more than a multiple although it does address common deficincies: <ul><li>Vitamins A, E, and B6 <li>Zinc, iron, calcium, and magnesium for healthy bones <li>Alpha-lipoic acid, vitamins B9 (folic acid), B12, C, E, flavinoids, and carotenoids for the anti-aging processes of cellular protection and cellular regeneration. </ul></div> <br><br> <?php include ("include/ads.txt"); ?><br><br> <?php include ("include/footer.txt"); ?> </BODY></HTML> Code: BODY { margin-left: 0%; margin-right: 0%; margin-top: 0%; font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR:#000000; BACKGROUND-COLOR:#ffffff; } A:link { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} A:visited { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} A:active { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} A:hover { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #FFFFFF; text-decoration: none; BACKGROUND-COLOR:#238c13; font-weight:bold;} FONT {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 13px; FONT-FAMILY: verdana, arial, sans-serif} .titular {COLOR: #000000; background-color:#238c13;} .negro {background-color:#000000; color: #FFFFFF; FONT-SIZE: 12px; FONT-FAMILY: verdana, arial, sans-serif; font-weight:bold;} .floatleft {float: left; border=1; padding=1; margin: 4px;} a { color:#09c; font-size:11px; font-family:verdana, arial, helvetica, sans-serif; font-weight:600; text-decoration:none; } a:link {color:#09c;} a:visited {color:#07a;} a:hover {background-color:#eee;} #head { font-family:verdana, arial, sans-serif; color:#000000; font-size:16px; font-weight:800; background:#238c13; padding:0px; } #head h1 { margin:0px 0px 0px 0px; padding:20px; color:#000000; font-size:18px; font-weight:800; z-index:1; } #head a, #head a:link, #head a:visited, #head a:active, #head a:hover { margin:0px 0px 0px 0px; padding:20px; color:#000000; font-family:verdana, arial, sans-serif; font-size:18px; font-weight:800; text-decoration: none; } /* All the content boxes belong to the content class. */ #content { position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */ width:auto; min-width:200px; margin:30px 170px 20px 220px; border:0px; background-color: #ffffff; padding:10px; color: #000000; font:bold 15px verdana, arial, sans-serif; z-index:5; } #content h2 {font:bold 16px verdana, arial, sans-serif; padding:15px;} #content a:link { font-size: 15px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} #content a:visited { font-size: 15px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} #content a:active { font-size: 15px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} #content a:hover { font-size: 15px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #FFFFFF; text-decoration: none; BACKGROUND-COLOR:#238c13; font-weight:bold;} #navi { position:absolute; width:200px; top:120px; left:20px; border-right:#238c13 2px dotted; background-color:#ffffff; padding:0px; color:#238c13; font:bold 13px verdana, arial, sans-serif; z-index:2; } #navi A:link { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} #navi A:visited { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} #navi A:active { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} #navi A:hover { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #FFFFFF; text-decoration: none; BACKGROUND-COLOR:#238c13; font-weight:bold;} #ads { position:absolute; width:130px; top:100px; right:10px; border-left:#238c13 2px dotted; background-color:#ffffff; padding:10px; z-index:3; } #footer { position:absolute; width:100%; top:730px; margin:10px 0px 0px 0px; padding:10px 0px 0px 0px; border-top:#238c13 2px dotted; background-color:#ffffff; z-index:4; } #footer A:link { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} #footer A:visited { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} #footer A:active { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #238c13; text-decoration: none; background-color: transparent; font-weight:bold;} #footer A:hover { font-size: 13px; FONT-FAMILY: verdana, arial, sans-serif; COLOR: #FFFFFF; text-decoration: none; BACKGROUND-COLOR:#238c13; font-weight:bold;} Hi, first of all i'm a bit new to this, but not a Compleet noob. pls be kind Ok, so my issue is i have a type of image gallery made with spans. I have the span tags enclosed by the <a href> tag. Spans are floating. The reason for this is that I want to have the border change colors on hover, wherever the pointer might be located in the span. It works great in firefox and IE8, but i just discovered this morning, much to my dismay, that it doesn't work in IE7 or below. of course it was the person i'm making the web page for that pointed this out, go figure. The problem is that eventhough IE shows that it is a link, when clicking on the image, nothing happens. text works find, the area around image and text works fine, just not the image. I tried searching google for a couple hours and could not find a fix that didn't involve javascript. I'm trying to avoid JS as much as possible, and so far all has gone well. Ok down to the nitty gritty. I stripped down the html so that it just shows one of the spans, so if you drop the code into notepad and save as htm you can play with it. css link is complete to my hosted css file. honestly im not sure why im using that doc-type, i don't completely unerstand the mechanics, i just thought for no sound reason at all that it would be better than html doc type. xhtml 1.0 validates and css validates as 2.1. Code: <?xml version="1.1" encoding="utf-8"?> <!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" xml:lang="en"> <head> <title>Bella Luna Gifts for the Soul - Wands</title> <link rel="stylesheet" type="text/css" media="screen" href="http://www.bellalunagifts.net/main.css" /> <!--[if IE]> <style type="text/css" media="screen"> body { behavior: url(csshover.htc); font-size: 100%;} #menu ul {text-align:left;} #menu ul li {float: left; width: 100%;} #menu ul li a {height: 1%;} #menu a, #menu h2 { font: bold 12px/16px arial, "lucida console", sans-serif; padding: 3px 2px;} </style> <![endif]--> </head> <body> <div id="page-container"> <div id="content"> <a href="http://www.bellalunagifts.net/rose_quartz_healing_wand.htm"> <span class="thumbnailleft"><img class="image" src="products/tn/rose_quartz_healing_wand.gif" alt="Rose Quartz Healing Wand" width="150" /><br/><br/>Rose Quartz Healing Wand<br /></span></a> </div> </div> </body> </html> If you just wanna glance at the css affecting the span and image, here it is. Code: .thumbnail { float: left; width: 150px; height: 210px; margin: 0 20px 15px 0px; padding: 5px; text-align: center; border-style: ridge; border-color: #3333FF; text-decoration:none; } a {text-decoration: none;color: #000000;} a:link .image {border-style: none;} a:active .image {border-style: none;} a:hover .thumbnailleft { border-color: #00CCFF;} a:hover .thumbnail { border-color: #00CCFF;} a:visited {text-decoration: none;color: #000000;} a:visited .image {border-style: none;} and i dont know why my docs are .htm instead of html.....long time ago i had a reason that may or may not have been valid but i should probably change to .html, yeah? well the link to the page im working on is http://www.bellalunagifts.net/wands.htm this is the last immediate piece of foundation code that i need to figure out to start rolling out the rest of the website. this is the first time i've posted for help, i really do try to figure out stuff on my own, but am ready to throw my head through the screen right now. and hell, if i'm goin about this in a silly way, pls tell me. i always welcome criticism. any help would be much much appreciated. i'm gonna keep trying to figure this out, but i'm hoping that one of you already knows what i'm doing wrong. i know my css code is probably redundant in places, but for now i'm just working on getting things to work. thx in advance for any reply. I have a website im developing and I wanted to know how i would go about having a graphic element that floats on top of everything but if it goes outside the bounds of the window it wont introduce scroll bars. Reason: I have an image that i want to make quite long but its not important for the viewer to see the end of the image. I guess its a bit like a background image but on the top Thanks my goodness what a popular site this seems to be. im just a n00b in css and xhtml right now, but hopefully not for long. im trying to use a table to arrange the images in my website introduction page. im trying to make the page look exactly the same no matter the browser window size. im trying to float the two images that have the names programmingimg.gif and programmingtext.gif, but they are not floating to the right, they are just staying adjacent to the other image in the same cell. one other problem that i am having is, that the only way for me to stretch the background gif across the window size it to fake a background. its just the first image in the file with a z index of -1. this works in FIREFOX but not in IE. in IE, nothing can be seen except the background image. does anyone have a solution to either of these 2 problems? css: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Patrick Allard's Very Graphic Website</title> <link rel="stylesheet" type="text/css" href="main.css" /> </head> <body> <img src="backgroundfire2.gif" alt="background image" id="bg" /> <table border="1" class="introlayout"> <tr> <td class="introtitle"> <img src="titlemaxfontgreyredfire.gif" alt="background image" id="titleimg" /> </td> </tr> <tr> <td class="skillpics"> <img src="analogskillspic.jpg" alt="background image" id="analogskillsimg" /> <img src="programmingpic.jpg" alt="background image" id="programmingimg" /> </td> </tr> <td class="skilltext"> <img src="analogskillsmaxfontblackbluefire.gif" alt="background image" id="analogskillstext" /> <img src="programmingmaxfontblackbluefire.gif" alt="background image" id="programmingtext" /> </td> </tr> <td class="menu"> <img src="mainmenumaxfontblackbluefire.gif" alt="background image" id="mainmenuimg" /> </td> </tr> </table> </body> </html> html: Code: html, body { height: 100%; margin: 0; padding: 0; } img#bg { position:fixed; width:100%; height:100%; z-index:-1; } img#titleimg { width:100%; } img#mainmenuimg { text-align:center; width:30%; } img#analogskillsimg { width:40%; height:60%; } img#programmingimg { float:right vertical-align:bottom; width:40%; height:60%; } img#analogskillstext { vertical-align:bottom; width:40%; } img#programmingtext { float:right width:40%; } table.introlayout { width:100%; height:100%; } td.introtitle { width:100%; height:10%; } td.skillpics { vertical-align:bottom; width:100%; height:70%; } td.skilltext { vertical-align:top; width:100%; height:10%; } td.menu { text-align:center; width:100%; height:10%; } I really need a code. It is for a Multiple Fixed Floating Images at specific margins Fixed is very important. AKA. Scrolls with page. margins are img1 - left: 40px top: 40px img2 - left 56px top: 300px; Thank You Very Much. -Please Help! --nick11682 I'm trying to have a logo in a div next to a navigation menu that can align at a specific height in my logo. but im having a problem with my li background images staying within the ul background image. Can someone help me fix my code to align this properly? HTML CODE: 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=utf-8" /> <title>Untitled Document</title> <link href="style.css" rel="stylesheet" type="text/css" /> <!-- load the typeface.js library and typeface.js fonts --> <script src="js/typeface-0.14.js"></script> <script src="fonts/haettenschweiler_regular.typeface.js"></script> </head> <body class="oneColFixCtrHdr"> <div id="container"> <div id="header"> <div id="navigation" class="menu"> <ul id="top-nav"> <li class="item4"><a href="#" title="Contact">Contact</a></li> <li class="item3"><a href="#" title="About">About</a></li> <li class="item2"><a href="#" title="Ideas">Ideas</a></li> <li class="item1"><a href="#" title="Portfolio">Portfolio</a></li> </ul> </div> <div id="logo"><span><a href="http://www.nadesignstudio.com/" title="NA Design Studio" rel="home">NA Design Studio</a></span></div> <div class="clear"></div> <!-- end #header --></div> <div id="mainContent"><h1 class="typeface-js">Main Content </h1> <div class="typeface-js"> <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. </p> </div> <!-- end #mainContent --></div> <div id="footer"> <p>na design inc, new york :: all right reserved 2010</p> <!-- end #footer --></div> <!-- end #container --></div> </body> </html> CSS CODE: Code: body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #FFFFFF; margin: 0; padding: 0; text-align: center; color: #FFFFFF; } .oneColFixCtrHdr #container { width: 800px; background-image: url(images/bg-stripe.png); background-repeat: repeat; margin: 0 auto; border: 1px solid #000000; text-align: left; } .oneColFixCtrHdr #header { padding: 10px 10px 0 10px; background: #000000; } .oneColFixCtrHdr #header h1 { margin: 0; padding: 10px 0; } .oneColFixCtrHdr #mainContent { padding: 0 10px; } .oneColFixCtrHdr #footer { padding: 0 10px; background: #000000; font-family: "Courier New", Courier, monospace; font-style: italic; font-size: 8pt; } .oneColFixCtrHdr #footer p { margin: 0; padding: 10px 0; } .typeface-js { font-family: Haettenschweiler; font-style: italic; letter-spacing: 1px; color: #FFFFFF; } #logo { display: inline; float: right; text-align: left; } #logo a{ background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(images/logo.png); background-origin: initial; background-position: 0 0; background-repeat: no-repeat no-repeat; display: block; height: 118px; margin-bottom: 10px; text-indent: -9000px; width: 296px; } .msie #blog-title a { margin-bottom: -10px; position: relative; } #navigation { background-image: url(images/bg-nav.png); background-position: 0 0; background-repeat: no-repeat no-repeat; float: right; height: 22px; width: 474px; margin-top: 75px; } #navigation ul { } #navigation li { float: right; height: 22px; position: relative; list-style: none; } #navigation li a { font-family: Haettenschweiler; font-style: italic; letter-spacing: 1px; text-decoration: none; text-align: center; color: #FFFFFF; font-size: 0.95em; font-weight: bold; background-image: url(images/bg-nav-btn.png); background-repeat: no-repeat no-repeat; height: 22px; display: block; width: 69px; overflow: auto; } #navigation li a:hover { background-image: url(images/bg-nav-btn.png); background-position: 50% -22px; background-repeat: no-repeat; color: #000000; } #navigation li.item1 a { font-family: Haettenschweiler; font-style: italic; letter-spacing: 1px; text-decoration: none; text-align: center; color: #FFFFFF; font-size: 0.95em; font-weight: bold; background-image: url(images/bg-nav-btn1.png); background-repeat: no-repeat no-repeat; height: 22px; display: block; width: 69px; overflow: auto; } #navigation li.item1 a:hover { background-image: url(images/bg-nav-btn1.png); background-position: 50% -22px; background-repeat: no-repeat; color: #000000; } .clear { height: 0; font-size: 1px; margin: 0; padding: 0; line-height: 0; clear: both; } Example of problem If Image doesnt show below, view it he http://nadesign.pisigmachi.com/wp-content/uploads/2010/02/example.jpg URL Ok so what is the css substitute for the valign tag? Thanks! Basically, I'm trying to get a div *bottom* to stick to the bottom of the page always, regardless if div *content* has enough data to push it down. Simple right? But it also needs to be able to align below the page just below *content* if the page needs to scroll, so it can't be aligned "absolutely". So how's it done? 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>Untitled Document</title> <style type="text/css" title=""> #sidebar { background-color: #00CC00; float: left; height: 100%; width: 250px; } #content { background-color: #FF66FF; float: left; height: 100%; width: 600px; } #bottom { background-color: #CCCCCC; clear: both; width: 500px; bottom: 0px; } </style> </head> <body> <div id="sidebar">Sidebar</div> <div id="content"> <p>Main Content Area </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="bottom">Bottom Nav Div - this page is layingout correctly. </div> </body> </html> |