CSS - Flash In Liquid Css Layout
Hello css gurus. I'm trying to fit a flash movie with 100% height in a liquid layout but i cant get rid of scroll bars.
i have tied to explain the problem in this image: http://i(dot)imgur(dot)com/PhvSZ.gif (sorry new members are not allowed to post with links) in that image you can see its fine in case (1) but in case (2) when i add a header div on top, flash movie doesnt fill available space. Can anyone tell me how can i fix it with a heading div on top? Thanks. Similar TutorialsI would like to create a 2-column layout with a content area on the left and a "sidebar" area on the right. Pretty standard, right? Now the trick: on some pages, the sidebar will be absent, and I want the content area to then overflow the whole page width. I tried the following: Code: <div style="background-color: red; float: left;">content area text</div> <div style="background-color: blue; width: 200px; float: right;">sidebar text</div> When div #2 is excluded, div #1 of course expands to take up the whole page width. So that works. The problem is that when they're both present, and div #1 has a lot of text, it just pushes div #2 down a line. Note: The reason div #2 will sometimes not be present is that Drupal is generating the page, and plain leaves out div #2 if there's no content in it. It's not just empty -- it's not even included in the page. Can anyone help me accomplish this? I've looked at a lot of liquid layouts, but none seem to do quite this. Hi all, I'm trying to get this mock up's structure finished STAT so that I can move on to the graphical, stylistic, and textual elements that need to be done, but I'm running into issues with IE... (surprised?) The goal is to get it to render as it does in FF and Safari. The issue right now is that, while the #body div is where I want it, it is not accepting the 85px bottom margin I am trying to code. Any help? (keep in mind I had to throw it in quirks mode to get it all to render like this) SITE is at: w w w [DOT] w h o l l y l i f e [DOT] o r g [SLASH] d r u m 2 [SLASH] Thanks, Michael Hello, To make my columns have equal lengths in fixed layouts, I have employed the Faux technique successfully. What would be the best technique for liquid layouts? I know of a js that suppose to equal the columns, and someone told there is a CSS method also. Can you still use the Faux? Any suggestions? i'm trying to write a liquit layout based in layers and css and have the next code: Code: <style type='text/css'> <!-- body{font-family:Verdana, Arial, Helvetica, sans-serif; margin:5px 5px 5px 5px; position:relative;} #header{border:1px solid #000000; width:100%; height:60px; position:absolute; top:0px; left:0px; min-width:600px;} #menu{border:1px solid #000000; position:absolute; top:60px; left:0px; width:15%; min-width:150px;} #content{border:1px solid #000000; position:absolute; top:60px; left:15%; width:85%; min-width:450px;} --> </style> and in the body: Code: <body> <div id='header'>header</div> <div id='menu'>menu links</div> <div id='content'>contents</div> the little problem here is thata due to the percentages used to determine the left position of the contents layer it overlaps with the menu layer when i resize the window but i've seen a lot of pages that do not behave this way... what am i missing???? Hello on this page, the author shows a 3 Column Liquid Layout based on CSS percentage use. http://matthewjamestaylor.com/blog/perfect-3-column.htm The column layout is 2,1,3 (center page comes first in the html code). He states "The columns can also be configured to any other order if required." How to do the column configured as 1,2,3? (left, middle, right)? Hi, I'm having a problem a liquid layout using 100 percent width. The inner box peeks out side to the right of the containing box (which is 100% width). I am viewing with firefox. At a resolution of 1024 width. With IE 6 it's very nasty looking (extremely wide). Can anyone tell me what I need to do or what I'm doing wrong please I have simplified the page to highlight the problem I'm having a problem on this page http://www.jamesfarrell.eu/fixhtml/search.htm HTML as follows: 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" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <link href="fixlayout.css" rel="stylesheet" type="text/css"/> </head> <body> <div id='wrap'> <div id="content"> <div class="searchresult1"> <h3><a href='info.php?id=486'>rent in france</a> (222.00) per week)</h3><a href=info.php?id=486><img src='images/no_image.gif' width='130' height='127' border=0 /></a><p>1 Bedrooms, 0 Bathrooms, House</p><p>s..</p> <a href='info.php?id=486'>More details</a> </div> </div> </div> <!-- <div id="goToTop" class="sNav"><p><a href="#content">^ Top</a></p></div> --> </body> </html> CSS as follows: Code: body { color: #333333; background-color: white; font-size: 12px; line-height: 1.3em; margin: 0; padding: 0; border:1px solid black; width:100%; } #wrap { background: white; margin: 0 0 2em 22%; } #content { padding:0; border-right: 1px solid #ccc; margin-right: 4em; width:97%; margin-left:2.75%; } div.searchresult1 { width:800px; width: expression(this.width > 400 ? 400: true); margin-top:20px; margin-right:40%; border:1px solid #9eceeb; } div.searchresult1:after { content:"."; display:block; clear:both; height: 0; visibility: hidden; } div.searchresult1{display: inline-block;} /* Hides from IE Mac \*/ * html div.searchresult1{height: 1%;} div.searchresult1{display:block;} /* End Hack */ div.searchresult1 h3{ background: #c0ddea; margin:0; padding:4px; } div.searchresult1 h4{ background: #c0ddea; margin:0; padding:4px; border:1px solid black; } div.searchresult1 img { margin: 10px; float:left; border:1px solid black; } Whenever I work on a liquid layout, I have been setting the Max-Width to 1280px. Is this still the normal setting? Or designers do go wider these days? Thank you Hi Guys, I have a layout which is currently setup to be liquid. Aka it spreads out depending on how big the browser window is. I'm trying to get it to be a set width. I can't quite get it figured out. Here is the link to the current layout (made to be generic). It's a layout I got from a CCS class. http://65.175.116.253/design/demo.html The css is here http://65.175.116.253/design/css.css The entire package can be downloaded here http://65.175.116.253/design/design.rar Now, to explain how I want it to look, I took my browser and made it just wide enough to show how wide I want the layout to be, and took a screenshot. But I can't get my css to make the whole layout that wide.. I'm scracthing my head here because it's probably really easy. http://65.175.116.253/design/demo.jpg Let's not worry about the exact width, but I want to define in the css the pixel width, so that can be changed whenever. Here is the CSS Code: /*--- Generic Styles ---*/ body { background: #e3edc2; color: #333; font: .8em, Arial, verdana, sans-serif; margin: 0; padding:0px; } #main {width:840px; margin:18px auto 0 auto; _text-align:left;} a { color: #686397; } a img { border: 0px none; } p { margin: 0 0 1em; } .smallboldtext { font-family: verdana, helvetica, sans-serif; color: #686397; font-size: .7em; font-weight: bold; } .mediumtext { font-family: verdana, helvetica, sans-serif; color: #686397; font-size: .9em; } .mediumboldtext { font-family: verdana, helvetica, sans-serif; color: #686397; font-size: .9em; font-weight: bold; } .largetext { font-family: verdana, helvetica, sans-serif; color: #686397; font-size: 1.5em; } /*--- Header Styles ---*/ #header { margin-bottom: 1.75em; padding-top: 1px; background: #abd240; } #navbar { margin: 0; padding: 0.5em 3em; background: #686397; color: #fff; } #navbar li { display: inline; margin-right: 0.5em; padding-right: 0.75em; border-right: 1px solid #99c; font-weight: bold; } #navbar li.last { border: 0px none; } #navbar a { color: #d4ec84; text-decoration: none; } #today { text-align: right; margin-top: -1.66em; padding: 0 2em 0 0; color: #fff; line-height: 1; } /*--- Content Styles ---*/ #content { float: left; padding: 0 20em 4em 3em; } #content h1 { background: #fff; color: #686397; font-size: 1.5em; margin: 0 33% 1.25em -2em; padding: 0.4em 2em; } #content h1 b { color: #b0d742; } #content h2 { margin: 0.5em 0; padding-bottom: 0.25em; border-bottom: 1px solid #b0d742; font-size: 1.5em; } /*--- Content Styles ---*/ table.basic { border: 0px; width: 100%; border-collapse: collapse; } table.basicborder { border: 2px solid #b0d742; width: 505px; border-collapse: collapse; } table.mainsearch { border: 2px solid #b0d742; width: 415px; border-collapse: collapse; } /*--- Sidebar Styles ---*/ #sidebar { float: right; width: 17em; margin: 0 1em 4em -18em; /* this creates a mathematical layout width of -1 */ } #sidebar div h3{ background: #9b96ca; } #sidebar form_div { margin: 0; padding: 0.8em; } #sidebar div{ background: #3a3c2d; color: #fff; padding: 0 1em 1em; margin-top: 0.75em; } #sidebar div h3{ font-size: 1.25em; margin: 0 -0.8em; padding: 0.4em 0.8em; text-transform: lowercase; } #whatiscompany h4{ margin: 0 0 0.5em; padding: 0.5em 0; border-bottom: 1px solid #fff; font-weight: normal; } #whatiscompany p:first-line{ font-style: italic; } /*--- Footer Styles ---*/ #footer { clear: both; padding: 1.5em 3em; background: #a0c63a; height: 15px; } #footer p { margin: .1em; } #footer a { color: #333; text-decoration: underline; } Hi all, I've spent several hours to solve this problem, but found nothing working . The problem (well, there are much more problems ) is that I use 2-cols layout, so the left column (menu) is floating left. And now I need in the one page's head to get 2 images, one aligned to the left, the other to the right and actual text of the headings. I've found 2 good solution: 1) Classic, use float:left on one image, float:right on the other, and text-align: center on the headings. First thing I don't understand, why the image on the right is moved down? You can see it here. Then, the clear property should be used to force the headings to end bottom the images, but clear can't be used, because it also clears the menu (floating to the left) so the headings ends bottom the menu. 2) Using absolute/relative positioning - headigns can be made relatively positioned, images absolutely, one with left:0 and the other with right:0, but then the contents following after the headings is moved to the top, mixed with the heading. Similar problem is being solved in this thread, but I didn't found there anything working . Can anybody help, please? Here are used CSS: Web.css, Fotogalerie.css. I would appreciate any advise as to whether this degrades properly as the browser is narrowed. I didn't post this in the "critique" forum because my only concern (right now) is related to CSS. There is a separate style sheet for handhelds, so if you have one I would appreciate a look from there also. Most links are still inactive. Liquid design TIA, Rob I am wondering which is the best way to display a flash header with a pure css layout. This is the way that I have it now and it works fine but I am new to web design and figured that if I am going to do it I should do it the right way. The css: Code: #master { width: 770px; margin: 10px auto; position: relative; padding: 0; border: 1px solid #566; border-top: 1px solid #566; background-color: #FFFFFF; overflow: hidden; } #masthead{ padding: 0px 0px 0px 0px; border-bottom: 1px solid #566; width: 100%; } The html: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- DW6 --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Pure CSS Test Page</title> <link rel="stylesheet" href="3col_leftNav.css" type="text/css"> </head> <body> <div id="master"> <div id="masthead"> <td> <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="770" height="200"> <param name="movie" value="../../images/header.swf"> <param name="quality" value="High"> <embed src="../images/header.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="160" height="160"></object> </td> <div id="breadCrumb"> <a href="#">breadcrumb</a> / </div> </div> Is there a better way to display the flash document? Also, should I create another layout div, say #flashheader? One last question. Is this the proper way to center the page? Please look at this page http://www.tmhdesign3.com and this one http://www.tmhdesign3.com/real-estate-broker.asp The first one used a flash file, the second does not. On the first page I want the dropdown navigation to overlay on the flash but it does not. I played with z-index to no success... Hi, Basically, this is one of my site pages: http://www.zombiemod.com/rm/nina2/about.html I want the white box in the middle to auto expand its height so it fills the vertical height of the page. Ive tried setting its height to 100% but that doesnt seem to work. This is my CSS for the white space: Code: #frame { position: relative; padding: 2px 15px 20px; /* background-color: #000;*/ color: #000000; height: 410px; } Can anyone help me with this? Im not great with this stuff, so I just want the easiest way possible, whether it is javascript or css. I'm getting ready to tackle a new project, it will be a hard one indeed. There will be two phases to the design. First a full css layout, I'm most likely going with a three column, header and footer layout. The left column will give the appearance it is outside the main design but it will be inside. I'll be using it to hold an events schedule on all the pages. The second phase I will do my best to attempt to integrate the layout as a WP theme so that it has all the WP back end control for a CMS but it will look nothing like a blog. I'm curious before I get started though should I go with a liquid design using % and ems measurements or a fixed width design? I know that there are advantages and disadvantages to both but which one is more widely used in website design these days I don't want it looking small on a high res monitor but I also don't want 800x600 users to be scrolling the width either. One more thing, The look I want is for the header and footer to stretch the entire width of the browser window and I know that is accomplished with liquid design but can it be with fixed width too? LB Running into some issues with a design. I have provided a link to show what is happening. at the end, with some code, css, etc The design calls for using up as much space width wise as possible, so that if the resolution gets bigger, the content in the main content section will expand. There is a left side nav, which is a fixed width, and then the main content section, which I do not know the width. both are floated left. The problem is, when the content in the main section expands to get bigger, in Firefox, will expand the size of the main section div to 100% of the screen before the text will flow to the next line, and thus, throws the div (which is floated) down to the next line. Without setting a width of the main content div, and wanting to keep the left side nav a specific width, I am not sure how to avoid this problem. I just happened check in IE7, and it seems to do what I want (I haven't checked IE6). I have posted a screenshot of what happens. On the left side, is IE7, at a bigger resolution also (1280) right side of screenshot is firefox, at a smaller resolution (1024) http://ricebox.whiteazn.com/liquid.png here is some code. Also, the CSS will seem to be declared more than once, but that is because they are split up between structure.css, text.css, and theme.css. I also only put in the CSS for the main body part. Any help would be appreciated. ======================= html4strict Code: Original - html4strict 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" xml:lang="en" lang="en"> <head> <title>Control Panel: Company Name</title> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> <link href="css/global.css" rel="stylesheet" type="text/css" /> <link href="scripts/p3p.xml" rel="P3Pv1" /> </head> <body> <div id="header"> <div class="logo"> <img src="images/header/logo.jpg" width="197" height="67" alt="alt" title="title" /> </div> <div class="nav"> <div class="parent-drill"> </div> <div class="manage-nav"> <ul id="main-nav"> <li><a href="?ebxid=221" class="inventory">Inventory</a></li> <li class="selected"><a href="?ebxid=700" class="leads">Leads</a></li> <li><a href="?ebxid=500" class="analytics">Analytics</a></li> </ul> </div> </div> <div class="details"> <div class="account-info"> Company Name <span class="rep">First Name</span> </div> <div class="account-details"> <ul id="account-nav"> <li><a href="?ebxid=725">Settings</a></li> <li><a href="?ebxid=244">Account</a></li> <li class="logout"><a href="?logout">Logout</a></li> </ul> </div> </div> </div> <div id="header-seperator"> </div> <div id="main-body"> <div class="top"></div> <div class="bot"></div> <div id="section-nav-narrow"> <div class="title-hdr"><h3>Leads</h3></div> </div> <div id="body-content">main page<br />main page<br />main page<br />main page<br />main page<br />main page<br /> main page<br />main page<br />main page<br />main page<br />main page<br />main page<br /> main page<br />main page<br />main page<br />main page<br />main page<br />main page<br /> main page<br />main page<br />main page<br />main page<br />main page<br />main page<br /> main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page main page </div> </div> </body> </html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> CSS Code: Original - CSS Code #main-body { overflow: hidden; margin-left: 10px; position: relative; } #main-body #section-nav-narrow { float: left; width: 133px; } #main-body .title-hdr { margin: 6px 3px 0 3px; padding: 0 0 6px 9px; } #main-body #section-nav-narrow .title-hdr { width: 118px; } #main-body .top { position: absolute; top: 0; left: 0; width: 133px; height: 8px; } #main-body .bot { position: absolute; bottom: 0; left: 0; width: 133px; height: 1px; } #main-body #body-content { float: left; min-width: 860px; } #main-body { background: #fff url(../images/cp_template/left_nav.gif) left top repeat-y; } #main-body #section-nav-narrow { } #main-body .top { background: #fff url(../images/cp_template/left_nav_top.jpg) left top no-repeat; } #main-body .bot { background: #fff url(../images/cp_template/left_nav_bot.gif) left top no-repeat; } #main-body .title-hdr { background-color: #fff; color: #1b5094; } #main-body #section-nav-narrow h3 { } #main-body .title-hdr h3 { font-weight: bold; font-family: Arial, Helvetica, sans-serif; font-size: 11px; }
Hey guys, how are you? So, I got two questions. Right now, on my main pages I have a fixed height, and wondering the best way to change it to a liquid one, so no matter how long the page is, I get a white background that's consistent with my 'main' <div>. And the second one, is how do I get a second background image on the body? I'm probably going to use almost almost a mirror type gradient of the top gradient, but not sure how to add it. You can view the two problems here http://thecheckoutplace.com/ home page). Thanks for your time, cheers. 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 Now that I've decided to use CSS and divs to hold my content, how do I make my page expand if a reader enlargens font size through his or her browser (especially if they use Firefox which can keep enlargening the font many sizes)? After enlargening the font size two steps in FF, the text expands so much it covers up other text in other divs, hides to the left and right, etc. Is liquid design what I want? Is liquid design what keeps divs expanding to accommodate enlargened font size? If so, where can I best learn liquid design online? I am redesigning a web application . I want to introduce color themes in it. When i click on a particular theme i want a new look to appear including buttons. For this i m using the below css code which uses only 3 button images(single image sliced in 3)wherin only the background color is to be changed thru css and new button gets created. Code: body { margin: 0; padding: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; } .btn { float: left; clear: both; background: url(images/btn_left.png) no-repeat; padding: 0 0 0 10px; margin: 5px 0; } .btn a{ float: left; height: 40px; background: url(images/btn_stretch.png) repeat-x left top; line-height: 40px; padding: 0 10px; color: #fff; font-size: 1em; text-decoration: none; } .btn span { background: url(images/btn_right.png) no-repeat; float: left; width: 10px; height: 40px; } .btn_addtocart { background-color: green; } HTML code: <div class="btn btn_addtocart"><a href="#>Submit</a><span></span></div> <div class="clear"></div> Background Color: Red For eg in a login screen The earlier web application used: <input type="image" onclick="javascript:return validate()> wherin the validate function includes Code: function validate() { var user = document.login.loginid.value; var pwd = document.login.loginid.value; if(document.login.loginid.value.length==0) { alert("Enter user name"); return false; } if(document.login.password.value.length==0) { alert("Enter password"); document.login.password.focus(); return false; } return true; } I am not able to use javascript:return validate() with this new html code i.e. <div class="btn btn_addtocart"> <a href="#>Submit</a><span></span></div> <div class="clear"></div> Background Color: Red Please help me with a similar css to run the above javascript or an alternative javascript to run the above css code. This post can be deleted. I figured out the problem. |