CSS - Expandable Banner
hmm i cant get this to work...
i have the left side of the banner that needs to be expandable wich is a long picture.....and the right side is 10px wide. how can i get this 2 in a div wich get width by % and center aligned on the page? and also on a layer above other stuff Similar TutorialsI was wondering... how can i make divs expandable so like when there is text that goes over the height limit.. now can i make the div move down abit.. along with the rest of the divs? I have never done this.. and im searching as i go.. so hopefully i can find some results. html Code: Original - html Code <form action="memo.read.php" method="post"> <div class="memo_container"> <div class="memo_userinfo"> <span class="info"> <b />From:</b> <?php print $username; ?></span> <span class="userdata"><?php print $icq . $aim; ?></span> </div> <div class="memo_subject"><span class="span" valign="bottom"><i>Subject: <?php print "{$rtv_memo['subject']} - {$rtv_memo['date']}"; ?></i></span></div> <div class="memo_contents"><span class="message"><?php print $rtv_memo['message']; ?></span></div> <div class="memo_buttons" align="right"><input type="submit" name="delete" value="Delete"><input type="submit" name="reply" value="Reply"> </div> </div> </form> <form action="memo.read.php" method="post"> <div class="memo_container"> <div class="memo_userinfo"> <span class="info"> <b />From:</b> <?php print $username; ?></span> <span class="userdata"><?php print $icq . $aim; ?></span> </div> <div class="memo_subject"><span class="span" valign="bottom"><i>Subject: <?php print "{$rtv_memo['subject']} - {$rtv_memo['date']}"; ?></i></span></div> <div class="memo_contents"><span class="message"><?php print $rtv_memo['message']; ?></span></div> <div class="memo_buttons" align="right"><input type="submit" name="delete" value="Delete"><input type="submit" name="reply" value="Reply"> </div> </div> </form> css Code: Original - css Code /* Starting Memo Div Classes */ div.memo_container { position: relative; margin-left: 20px; width: 580px; height: 432px; } div.memo_subject { position: absolute; border-top: 1px solid #cccccc; border-right: 1px solid #cccccc; left: 152px; width: 425px; height: 20px; background: #ffffff; } div.memo_subject .span { position: absolute; padding-left: 8px; margin-top: 8px; height: 10px; word-wrap: break-word; font-family: arial,helvetica; color: #00000c; font-size: 72%; } div.memo_userinfo { position: absolute; float: left; border: 1px solid #cccccc; width: 150px; height: 150px; word-wrap: break-word; white-space: wrap; background: #d8d9d7; } div.memo_userinfo .info { position: absolute; padding-left: 2px; margin-top: 8px; font-size: 88%; } div.memo_userinfo .userdata { position: absolute; top: 130px; padding-left: 2px; font-size: 88%; } div.memo_contents { position: absolute; float right; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-top: 1px solid #cccccc; left: 150px; top: 20px; width: 427px; height: 130px; word-wrap: break-word; white-space: wrap; } div.memo_contents .message { position: absolute; padding-left: 10px; margin-top: 2px; } div.memo_buttons { position: absolute; top: 152px; width: 577px; height: 25px; border-right: 1px solid #cccccc; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; background: #ffffff; } div.memo_buttons input { height: 22px; margin-top: 2px; }
So far everything here works.. but just needed to know if it is possiable what i am asking. Hello, i am having run into a problem with a div. And im not sure if this is even possible. I have a <div id="content"></div> which has all my pages content in it. and below that i have my footer <div id="footer"></div>. Well i need the "content" div's height to be at least 400px, and if there is a lot of text in the "content" div, i need it to stretch longer. But currently, when i have more text in the "content" div that is longer than 400 px, it goes ontop and over the "footer" div. because i have "content" set to overflow:visible. So is there any way to make the "content" div at least 400px height, and still stretch if there is more text in it? Hi and thank you in advance for any advice or help. my website: http://earlystartdc.com/ Im having trouble trying to find the right css code so that i can adjust the banner underneath the menu in order to remove the white spaces in the module. I would like for the banner to be at margin 0 so that its all the way to the top without any white space in between. any help?? Thank you P.s - This is what my css files look like from my template/css folder . Hi there, I have the following in my css file: } #headerBannerWrapper { background-image: url(/GREENLOGO.jpg); background-position: bottom left; background-repeat: no-repeat; background-color: #DEF2B0; padding: 0px; margin: 0px; } #headerBannerWrapper img { padding: 0px; margin: 0px; vertical-align: bottom; However the banner doesn't get rendered in IE7. It renders OK in IE8 Any help most appreciated. The above is linked to the following class: .clearFix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; NB If the banner has content inside then it renders OK, however if there is no contents inside then the banner (green background) is not displayed. I'm trying to figure out a way to create a banner across the top that consists of an image, but whose right edge extends all the way to the right edge of the browser -- regardless of the window size. At the same time, I need to do the same thing with the left column: fill it with an image whose bottom edge extends all the way to the bottom of the window. I can do this with tables, but can't figure out a cross-browser way to do it in CSS. The "stretchy" right edge of the banner is simply a 1 pixel wide slice of the banner's right edge, repeated as necessary. Similarly, the "stretchy" bottom of the left column is a 1 pixel slice of the bottom of the column's image. I can't get these to appear in Mozilla. Here's my code: Styles.css: PHP Code: .banner { background-image:url(./images/banner-fill.gif); width:100%; } .nav { background-image:url(./images/nav-fill.gif); width:104px; height:100%; } .content { position:absolute; left:140px; top:140px; } Template.htm: PHP Code: <html> <head> <title>Template</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="css/styles.css"> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="height:100%;width:100%"> <div class="banner"><img src="images/banner.jpg" width="800" height="134" border="0"></div> <div class="nav"><img src="images/nav.jpg" width="104" height="327" border="0"></div> <div class="content"> <p>Page Content</p> </div> </body> </html> I've been away for nearly three months and may have forgotten some of the basics of CSS. Today I added a banner photo to the top of my new bike club site, but cannot remember how to style it so that, when a visitor adjusts the width of their browser window, the banner photo sidles to the left or right to remain centered at the top of their window, along with the the bike club name and pull-down menus immediately below (see http://stallinswebdesign.com/vs/index.php). Can you suggest how I can style that banner photo so that it remains centered whenever a visitor stretches their browser window? I know you can view source to view my <div> structure and so forth; let me know if you'd like to see any parts of my style sheet. Thank you for your valuable time. Curtis Hi, I just installed Gallery on my website, and I'm trying to integrate it with the main theme of the rest of the site. Well I'm having a problem with the banner overlapping the logo in FireFox. It renders fine in IE7 (surprisingly), but not in FF. Have a look he http://www.lightblu.com/gallery/main.php un/pass: test/test You can look at how I want it on the homepage, or anywhere else for that matter. What am I doing wrong? I tried everything with no success. Thanks guys --Waj Hi, I need to add some content (small div) over the top of a flash banner. I tried adding wmode="transparent" to both the object and embed tag but that didnt work. Any other suggestions? thanks i am writing a site for fun to learn how websites work. The site i write right now will be like a school newspaper. I have one problem with the background, at the begining i couldnt make it no repeat but later i did it, now, i got something wrong with my code. PLease help me here is my code: ( i mean that the back ground color does not appear!! Code: <html> <head> <title> blah blah </title> </head> <body bcolor="#004d79"> <center> <img src="/pics/banner.png"> </center> <h4> <b> <center> blah blah </center> </b> </h4> <style type="text/css"> <!-- body {background-image: url(pics/background.png); background-repeat: no-repeat;}set to background-repeat: no-repeat;background-position:center; </style> <center> <b> (C) blah blah </b> </center> <center> <div style="position:absolute;top:130px;left:375px"> <h1> <b> <p> Our website is under construction!!<br>Thank you for visiting us!! </p> </b> </center> </h1> </div> <div style="position:absolute;top:250px;left:260px"> <b> <p> blah blah </p> </b> </center> </div> </html> Thanks alot, J. Hi everyone, I've been playing around with this for a while but I can't seem to get it to work. Basically, I'm trying to get this table effect in CSS layers. Code: <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#669999"> <td width="580">Welcome</td> <td> <div align="right"><img src="images/bg_dblue_gradient.gif" width="200" height="25"></div> </td> </tr> </table> It's basicly a 2 column layout, with the left column being some kind of content and the right column being a gradient graphic I made, to make the banner look like it has a full gradient. The gradient graphic is 200px wide, thus one resizing of the browser the table in a whole won't shrink down past 780 pixels. I want to use a <div> tag for the graphic so I can repeat-y and have the gradient appear fluid if someone resizes the text size. Any suggestions? Cheers, Fozzy Hi everyone I am running a blog that uses xhtml and css style sheets to generate templates. I have about 10 templates that I would like to switch to and from. I want to add a banner on the bottom of the page, but I cannot figure out how to do it correctly. If I add it to the footer templates, before the </body> tag, it does not always come out correctly. Sometimes it the banner ends up in the 3rd column over to the right, sometimes the banner is obscured by the body of the main column. I am trying to find a way to forcefully push the banner to the bottom of the page, below all of the text that is generated. I was thinking that perhaps javascript could be used to force a banner underneath, but I am not too familiar with the sort of code that is in my blog. any ideas? thanks Roy I like the way this liquid banner degrades as the browser is narrowed. Is this the preferred way to accomplish this effect? I like the way the overflow: hidden attribute causes objects to basically disappear rather than force the banner div to be taller as content shifts. If you could please pick this apart I would appreciate it before I update 500 product pages with it. For testing purposes I have simply styled the html tags directly. When I get it right I'll make it external. Code: <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"></meta> </meta> </head> <body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" style="overflow: auto"> <div style="border: 1px solid gray; text-align: center; height: 72px; background: white url(site_images/share_logo_header_middle.gif) repeat-x; overflow: hidden"> <div style="float: left; margin-top: 0px"><img src="site_images/share_logo_header_left.gif" alt=""></img></div> <div style="float: right; margin-top: 0px"><img src="site_images/share_logo_header_right.gif" alt=""></img></div><h1 style = "font: 1em/1.2 Verdana, Arial, Helvetica, sans-serif; color: navy; font-size: 1em; margin-top: 0px; line-height: 40px">The finest Specialty Chemical Products Since 1971</h1> </div> <div>Content is king </div> </body> </html> See the page here. As I'm writing this thread I see that I need to clean up a few unneeded declarations in the css - please disregard. Thanks for looking, Rob Hi, I want to place a Logo and Banner in the header using CSS, i tried this but no use its not working properly. PHP Code: div#main #header{ width:100%; height:95px; text-align: center; background:url(images/top_bg.jpg); } div#header #header_title{ text-align:left; font-family: Arial, Helvetica, sans-serif; font-size:25px; color:#ffffff; padding-left:20px; padding-top:20px; } div#header #header_title #banner{ text-align:right; width:468px; height:60px; background:url(images/banner.jpg); background-repeat: no-repeat; padding-right:20px; padding-bottom:20px; } Then i used this in html PHP Code: <div id="page"> <div id="header"> <div id="header_title"> Your Logo <div id="google"></div> </div> </div> But its not working properly, please please please help me....thanks... vinodkv Hi guys I've added a banner zone in my site, but it is not looking good in FF nor IE !! Site: www.stockestate.com Code for the banner zone (div) Code: #banner { float:left; position:relative; top:0px; left:25px; width:468px; height:60px; margin-top: 50px; padding: 4px 4px 4px 4px; } Does any1 know what should I try to fix this ? Thanks Hello. Test Page CSS Page I'm trying to get my banner working properly. I have a div for the banner itself #banner and then I have an #innerbanner for the contents (images). I use a BG image in the #banner that allows it to be stretchable. I want one of my images in #innerbanner to be tight to the left and the 2nd of tight to the right side of the screen. I tried using a spcaer in the middle to allow for space between the images when it gets stretched but nothing is lineing up properly in firefox or IE 6. Any suggestions? My content and navigation bars, though set to 100%, are actually 100% (of the body/html element) plus 100 pixels (their "top" property). If I set their "top" property to 0, they fit the page perfectly but I need them below the title banner. Is there a way to make the 100% height value of these two columns relative to the fixed height of the title banner? Note: One solution was to set their "bottom" properties to 0px. This does not work in IE so it's not a valid option. Also, I do not have the option of setting the navigation's and content's divs to a "top" value of 0 and rasing the title banner's z-index to cover them as I need the overflow scroll bars to extend from the bottom of the title banner to the bottom of the page and not from the top of the page to the bottom of the page. (think frameset ) Code: <!DOCTYPE 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" xml:lang="en"> <head> <title>100% Height - CSS Problem</title> <style> html { height:100%; } body { height:100%; padding:0px; margin:0px; background-color:#CCCCCC; } #title_banner { display:block; position:absolute; width:600px; height:100px; left:0px; top:0px; background-color:#CC6666; } #navigation { display:block; position:absolute; width:140px; height:100%; left:0px; top:100px; background-color:#66CC66; overflow:auto; } #page { display:block; position:absolute; top:100px; left:140px; width:460px; height:100%; background-color:#6666CC; overflow:auto; } </style> </head> <body> <div id="title_banner"> Set width and heighth title banner image. </div> <div id="navigation"> Navigation links. </div> <div id="page"> Page content. </div> </body> </html> I'd appreciate any links you can share as well. All of the tutorials I've seen for 100% high pages do not include a horizontal, fixed-height banner across the top. |