CSS - Css Hight Vary From Page To Page
Dear all
I need page height vary from page to page. But I cannot do this , please send your comments for this You can access my css , Other question is , different appear for firefox and IE , some time footer overlap I need to set pages height for their contents, can I do it with one , it is difficult to do all pages for separate styles This is my link "www. kawdoco. com/ test /" Thanks asanka Similar TutorialsI am generating a list with PHP that is going to be printed out and hung up for display. I would prefer if the following weren't printed. 1) Top Left - Page Title (I know I can have this disappear by having a blank title, but I would prefer to have one) 2) Top Right - Page URL 3) Bottom Left - Page number (ex: 1 of 2) 4) Bottom Right - Date Is there any way to print the list without these? I wasn't sure if there is some css I can use, or if this is something that the printer prints automatically. Thanks Hello, First off, if you know of a way to make round cornered boxes (that stretch hor and vert) in css using less than 6 divs, please be my guest. Now the problem I'm having is IE specific, when i load up the IE DOM inspector, i see that all the divs before the bottomleft div have a height that too big. i don't know what this could be from because i never set a height attribute for any of the divs. http://72.29.74.19/~majdkgf/tangerine/ NOTE: this doesn't happen to the last box Ok i made a design for a website in photoshop .. sliced it up into divs put it in dream weaver and i edited to css for the divs there... I'm having a problem with all the columns with background images to stretch to the end of the page dynamically according to the hight of the highest column.. For example if i add more content to the content section of the site i have to go in and change the hight of every repeatable background image that extends to the bottom of the page.... as you may know this sucks and i really want to figure out how to get the site the way it should be so its easily editable. .. I know quite a bit of the problem is the fixed positioning that's being used but the website is not a perfectly square site so some exception need to be made.. i tried to make a website that was way above my lvl to make but i made it.. its just has some bugs i need to figure out.. To get the problem to occur all one has to do is make the text bigger using the browser and watch the background image not extend to the end of the site.. which is all i need to happen ... so if i add or subtract content the site auto adjusts to the size.. really need some help on this.. thanks.. Hi, Can anyone recommend how best to how to dynamically constrain amount of Text/Content in a DIV area that can vary in size?? That is, say you have: (a) a content (DIV) area on your view that can expand/contract depending upon browser size ( i.e. when someone is re-sizing the browser window) and (b) dynamic text/content that is to be displayed, based upon user input - e.g. image a defined area/size for several user comments for example. Users can create their own comments, but you only want them to be able to take up a given amount of screen resource, and then perhaps have a "...more" link at the bottom if they go over. How can I best setup this up? e.g. (1) How to setup the layout/CSS so that if more text / content is present in the DIV area that can be displayed that the DIV area doesn't expand due to the extra content the user put forward, and/or (2) Do I need to also complete this by programming what content comes out? E.g. in Ruby on Rails say then the question would be how to calculate how much text/content can fit in the current size of the DIV (noting browser re-sizing) so that you get the chance to put the "...more" link at the bottom? Hopefully this approach isn't required. Any other suggestions welcome that address what I'm trying to do are welcome, which is really offering a area for display of user feedback where each piece of feedback has a maximum area it can take on the main screen only, and also that browser re-sizing is possible. Tks Greg Hi All : Currently i'm running in .NET platform together with VB.net and ASP. I faced a problem regarding to the PAGE BREAK html tag. The problem is when i want to print out a report, it will show with scroll bar and the report is very long. So what i have to do is to apply Page-Break-After/Before into the HTML. how am i know if the report already apply the Page Break function or not? And the only style i can use is CSS. Anyone familiar with this? It's urgent !! Hope can get anyone help asap. Regards, JeFFery Howcome: html, body { color: #06F; background-color: #000; font-size: 16px; text-align: center; width: 768px; } Doesn't center the page in the browser? How can I center it? Output example on my website here. I am trying to make a pattern tile the full height of the page and match up with an image at the top. It's a little bit hard to explain and a lot easier to show, so I've documented my first two attempts below. Failed Solution 1 - Pattern as a part of a div set at height: 100%; with outer divs also set at height: 100%; See attempt 1: Code: http://www.hesterdesigns.com/Web2/yellow.html Problem is that the divs aren't growing to the height of the page, and so the pattern isn't tiling the whole height of the page. Failed Solution 2 - The Pattern is part of the body background which tiles on y. See attempt 2: Code: http://www.hesterdesigns.com/Web2/index.html Any suggestions? I'm hoping to find a way to do this using only CSS and without having to resort to Javascript solutions. Alright... I give up on this one. The copyright moves up and down by a pixel or two between different pages. Go from the Home page to the Diabetes page and look at the footer and you will see. I have tried changing the margins, padding, and line-height on the text in the footer. I can get it to temporarily work but as soon as I change anything above the copyright (i.e. in the #content div) like line-height, add text, and etc it moves the copyright between pages again. Basically the content div is pushing down on the copyright differently depending on the amount of text that is in the article. Because other than the text all the articles pages code is exactly the same. All the footer text is a PHP include if that makes a difference. Thanks for looking at it because I have been working on this for quite a few days now and it is buggin the ba-jesus out of me? I have a theory, the footer (thats where the copyright is) is absolute positioned. Therefore it is taken out of the flow of the document. Could this be the cause of my problem? So if I were to place all the copyright and footer links within another div within the footer div would that bring those back into flow? Like if I gave that new div a position of static or something? Or is it out of the flow regardless because it's sitting inside of an absolute positioned div? Thanks a lot - here is the site in question Hi, I have a front page which is one image only, no text. The image is centered horizontally (i.e. a simply text-align: center; ). My question is - how do I centre it vertically? (no matter what the resolution of the website visitor is). i.e. Currently the image is at the top of my screen. I would like it to be in the centre, both horizontally and vertically. Many thanks! I could do this using Frames but I absolutely loathe them so I need to do it in CSS I have an A-Z across the top of the page which stays there while the results scroll below. Unfortunately, while I can do basic CSS, complicated stuff like this is way beyond me! Help would be most appreciated! Hello everyone, I've been working on my school website for some time now - but I recently started over where the markup and style sheets are concerned. Both my html and css validate. This is my html source: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Secondary School</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css"> <script type="text/javascript"> <!-- function view_event(url) { window.open(url, 'event', 'top=100, left=100, width=200, height=350'); return false; } //--> </script> </head> <body> <div id="container"> <h1> Secondary.School. </h1> <div id="nav"> <ul> <li> <a href="index.php"> Homepage </a> </li> <li> <a href="#"> School Information </a> </li> <li> <a href="departments.html"> Departments </a> </li> <li> <a href="#"> Clubs </a> </li> <li> <a href="#"> SCC </a> </li> <li> <a href="#"> Resources </a> </li> </ul> </div> <div id="primaryRail" class="rail"> <h2> Contact information </h2> <p> <b> 127 Maple Street Testo, Orbuk, H58 435 </b> <br /> <b> Telephone: </b> (456) 245-5677 <br /> <b> Fax: </b> (456) 456-4567 </p> </div> <div id="secondaryRail" class="rail"> <h2> Our administration </h2> <p> <b> Principal: </b> <i> Alan N </i> <br /> <b> Vice-Principal: </b> <i> Lucy S </i> <br /> <b> Vice-Principal: </b> <i> Candice H </i> </p> </div> <div id="primaryContent" class="content"> <h3> Welcome to the Secondary School website! </h3> <p><b>XHTML TESTING</b><br /> April 11, 2007<br /> Posted by : <b>admin</b><br /> Pellentesque sit amet mauris. Nullam non lacus. Etiam auctor. In purus. Nulla dolor lectus, posuere et, cursus a, tincidunt non, mi. Vestibulum interdum turpis in erat vehicula consequat. Vivamus sit amet turpis vitae massa tristique auctor. Mauris quis turpis. Quisque at mi. Suspendisse consequat faucibus elit. Morbi scelerisque porttitor ligula. Vestibulum non purus. <a href="#"> link testing </a><br /> <a href="#top">Top</a></p><p><b>admin</b><br /> April 11, 2007<br /> Posted by : <b>admin</b><br /> Pellentesque sit amet mauris. Nullam non lacus. Etiam auctor. In purus. Nulla dolor lectus, posuere et, cursus a, tincidunt non, mi. Vestibulum interdum turpis in erat vehicula consequat. Vivamus sit amet turpis vitae massa tristique auctor. Mauris quis turpis. Quisque at mi. Suspendisse consequat faucibus elit. Morbi scelerisque porttitor ligula. Vestibulum non purus. <br /> <a href="#top">Top</a></p><p><b>test</b><br /> April 10, 2007<br /> Posted by : <b>mr.southern</b><br /> test<br /> <a href="#top">Top</a></p><p><b>test</b><br /> April 10, 2007<br /> Posted by : <b>mr.s</b><br /> test<br /> <a href="#top">Top</a></p><p><b>Testing</b><br /> April 09, 2007<br /> Posted by : <b>Jonathan</b><br /> This is just a test message.<br /> <a href="#top">Top</a></p><p><b>test</b><br /> April 05, 2007<br /> Posted by : <b>test</b><br /> test<br /> <a href="#top">Top</a></p><p><b>Test</b><br /> April 05, 2007<br /> Posted by : <b>Jonathan</b><br /> Test.<br /> <a href="#top">Top</a></p><p><b>Another test post.</b><br /> April 05, 2007<br /> Posted by : <b>Jonathan</b><br /> Just another test.<br /> <a href="#top">Top</a></p><p><b>Lorem ipsum dolar et sit</b><br /> April 05, 2007<br /> Posted by : <b>Jonathan</b><br /> This is just a test post.<br /> <a href="#top">Top</a></p><p><b>Lorem ipsum dolar et sit</b><br /> April 05, 2007<br /> Posted by : <b>Jonathan</b><br /> This is just a test post.<br /> <a href="#top">Top</a></p> </div> <div id="secondaryContent" class="content"> <h2>Calendar for April 2007</h2> <table> <tr class="days"><td>Su</td> <td>Mo</td> <td>Tu</td> <td>We</td> <td>Th</td> <td>Fr</td> <td>Sa</td> </tr> <tr><td class="week" title="Sun, 01st April 2007">1</td> <td class="week" title="Mon, 02nd April 2007">2</td> <td class="week" title="Tue, 03rd April 2007">3</td> <td class="week" title="Wed, 04th April 2007">4</td> <td class="week" title="Thu, 05th April 2007">5</td> <td class="week" title="Fri, 06th April 2007">6</td> <td class="week" title="Sat, 07th April 2007">7</td> </tr><tr> <td class="week" title="Sun, 08th April 2007">8</td> <td class="week" title="Mon, 09th April 2007">9</td> <td class="week" title="Tue, 10th April 2007">10</td> <td class="week" title="Wed, 11th April 2007">11</td> <td class="week" title="Thu, 12th April 2007">12</td> <td class="week" title="Fri, 13th April 2007">13</td> <td class="week" title="Sat, 14th April 2007">14</td> </tr><tr> <td class="week" title="Sun, 15th April 2007">15</td> <td class="week" title="Mon, 16th April 2007"><a href="calendar.php?dateline=1176699600" style="padding: 0px;" onclick="return view_event(this.href);"><span style="color: red; font-weight: bold;">16</span></a></td> <td class="week" title="Tue, 17th April 2007">17</td> <td class="week" title="Wed, 18th April 2007">18</td> <td class="week" title="Thu, 19th April 2007">19</td> <td class="week" title="Fri, 20th April 2007">20</td> <td class="week" title="Sat, 21st April 2007">21</td> </tr><tr> <td class="week" title="Sun, 22nd April 2007">22</td> <td class="week" title="Mon, 23rd April 2007">23</td> <td class="week" title="Tue, 24th April 2007">24</td> <td class="week" title="Wed, 25th April 2007">25</td> <td class="week" title="Thu, 26th April 2007">26</td> <td class="week" title="Fri, 27th April 2007">27</td> <td class="week" title="Sat, 28th April 2007">28</td> </tr><tr> <td class="week" title="Sun, 29th April 2007">29</td> <td class="week" title="Mon, 30th April 2007">30</td> <td class="week"> </td> <td class="week"> </td> <td class="week"> </td> <td class="week"> </td> <td class="week"> </td> </tr> </table> <a href="index.php?m=3">Previous month</a> <a href="index.php?m=5">Next month</a> <p style="font-weight: bold;">XHTML TESTING</p> <p style="font-weight: bold;">admin</p> <p style="font-weight: bold;">test</p> <p style="font-weight: bold;">test</p> <p style="font-weight: bold;">Testing</p> <p style="font-weight: bold;">test</p> <p style="font-weight: bold;">Test</p> <p style="font-weight: bold;">Another test post.</p> <p style="font-weight: bold;">Lorem ipsum dolar et sit</p> <p style="font-weight: bold;">Lorem ipsum dolar et sit</p> <p>Pellentesque sit amet mauris. Nullam non lacus. Etiam auctor. In purus. Nulla dolor lectus, posuere et, cursus a, tincidunt non, mi. Vestibulum interdum turpis in erat vehicula consequat. Vivamus sit amet turpis vitae massa tristique auctor. Mauris quis turpis. Quisque at mi. Suspendisse consequat faucibus elit. Morbi scelerisque porttitor ligula. Vestibulum non purus. </p> </div> </div> <div id="footer"> <p> <img src="images/tiger.jpg" alt="tiger logo" style="float: left;" /> | <a href="#"> homepage </a> | <a href="#"> school information </a> | <a href="#"> departments </a> | <a href="#"> clubs </a> | <a href="#"> scc </a> | <a href="#"> resources </a> | <br /> Copyright <span style="font-size: x-small;"> 2007 </span> Secondary School. </p> </div> </body> </html> And this is my style sheet: Code: /* Secondary School CSS Document /* Page and Link Formatting ---------------------------- */ a { text-decoration: underline; font-family: Georgia; padding-bottom: 3px; color: #FF42B1; } #nav a { text-decoration: none; font-family: Georgia; font-size: 12px; padding: 12px 10px 8px 10px; color: #F9F9F9; } #nav a:hover { background: #454545; } #nav li { display: inline; } body { background: url('images/header.png') repeat-x; margin: 0px; padding: 0px; text-align:center; } /* Divs etc... ---------------------------- */ #container { margin:0px auto; width: 700px; text-align: left; } #container h1 { margin-top: 60px; } #primaryRail { width: 350px; float: left; } #secondaryRail { width: 350px; float: left; } #primaryContent { margin: 55px 0px 0px 0px; width: 500px; float: left; } #secondaryContent { margin: 55px 0px 0px 25px; width: 175px; float: left; } #footer { clear: both; text-align: center; background: #EDEDED; border: #E2E2E2 2px solid; } /* Standard Elements ---------------------------- */ h1 { font-family: Georgia; font-weight: normal; font-size: 2em; color: #F9F9F9; } h2 { font-family: Georgia; font-weight: normal; font-size: 1.5em; color: #454545; } h3 { font-family: Georgia; font-weight: normal; font-size: 1.5em; color: #812F2F; } .rail h2 { color: #FFD11B; } p { font-family: Georgia; font-size: .85em; color: #454545; } .rail p { color: #F9F9F9; } .content p { line-height: 1.5em; } ul { padding: 0px; } li { list-style: none; } table { color: #AFAFAF; } td { padding: 5px; padding-top: 2px; padding-bottom: 2px; } .days { background: #DCDCDC; font-weight: bold; font-size: .75em; } .week { background: #FFFFFF; font-size: .75em; } .nomonth { background: #FAFAFA; } #swd_info { display: none; font-family: Verdana, Arial, Helvetica, sans-serif; position: absolute; width: 180px; background-color: #FFFF99; color: #000000; border: 1px solid #000000; padding: 3px; font-size: 10px; text-align: justify; } This is how it looks in FF, and that is how I would like to to be in FF, and any common browser that the user may be operating: img133.imageshack.us/my.php?image=ffexampletx6.jpg Thank you! When I start my page layout, it always starts around an inch down from the top of the browser. Ive seen websites, like techeblog.com that start all the way from the top. How do i do that? Thanks. Hey guys. You can run an image, a border, text, whatever you want off the top of the page, but can you do it with the bottom of the page. Code: .top { position: relative; left: 0px; top: -75px; } That will of course run an image off the top of the page, but Code: .bottom { position: relative; left: 0px; bottom: -250px; } this line of code will simply but the image relative to the top image and it's completely visible, meaning the user can view the entire image simply by scrolling down. I'm placing my <id>'s in tables right now, but I'm open to whatever. I simply want an image consistently, running off the top of the page and the bottom of the page at all times. Any ideas? Thanks in advance. The following code is in my main div... It's supposed to be on the on the right side of the page, but in FF it is on the left. IE displays as I expected it too. Any ideas? Code: <div class="r close"> <div id="selection"> <h3>Back To:</h3> <form class="close" action="clientwrkorder.asp" method="post"> <input type="submit" value="Work Order" size="20" /> </form> <h3>Sample Analysis</h3> <form class="close" name="frmSample" action="clientresults.asp" method="post"> <input type="submit" disabled="disabled" value=" < " onClick="return PrevSample()" id=submit1 name=submit1 /> <select name="Sample" onchange="frmSample.submit()" > <option value="01" selected="selected" > 01 </option> </select> <input type="submit" disabled="disabled" value=" > " onClick="return NextSample()" id=submit2 name=submit2 /> </form> </div> </div> css Code: Original - css Code body { margin:0; padding:0; width:100%; color:#000000; background-color:#ffffff; font-size:12pt; } #main { margin-left:5px; margin-right:5px; } .close { margin:0; padding:0; } .r { text-align:right; } #selection { width:200px; text-align:center; } body { Maybe you guys could tell me why my site is so messed up in IE. http://tabmatic.com/tabmatic/showartist.php?aid=1 2 of the 3 top links are underlined, but aren't supposed to be. The rows in the main area aren't the right height. The images on the sides aren't the right height. If you refresh it after going there, it changes the row heights again. Could anyone tell me what's wrong? Hi i'm trying to get my DIV to fit 100% in height of the page, i have set it to height:100%; but its only as big as the content in it. is there a way i can get it to fit the screen 100%? Thanks Shem Edit 3: Sorted now guys, set my divs to fixed and got JS to do: Code: document.getElementById("loading-image").style.marginLeft = (screen.width/2)-73; document.getElementById("loading-text").style.marginLeft = (screen.width/2)-24; Can't remember exactly how I got to the figures of 73 and 24 but I worked it out on the calculator and it is center so who am I to complain? :P --------------------------------------------------------------------------- Basically, I have two divs, one slightly under the other, at the top of the page, but I want to have them on top of the content. Screenshot at the moment: Appropriate CSS: Code: div#loading-image { background-color: #F5F5F5; border: solid 1px #000000; border-right: none; height: 36px; margin-left: auto; margin-right: auto; padding: 8px; position: relative; width: 32px } div#loading-text { background-color: #F5F5F5; border: solid 1px #000000; border-left: none; color: #202020; font-family: Segoe UI, Arial, Verdana, sans-serif; font-weight: bold; height: 36px; left: 68px; margin: auto; padding: 8px; position: relative; top: -54px; width: 80px } When the bottom div is clicked, the two divs change using AJAX so that they have a loading image and the word 'Loading...' in them, but I also need them to be invisible before the div is clicked. So there we go, main topic question is about the divs going on top of the page, but also, how to make them hidden. Thanks guys and girls, Danny. Edit: If I change the position element to fixed on them both, it puts it at the top of the page, but goes behind my logo and it is quite difficult to get it exactly center. Edit 2: I now have the divs fixed with z-indexes of 1 to make them on top of the page, but I now need a way of centering them horizontally. Can't get a background using the style sheet. The image exists. If I put <img src="images/background_2b.jpg" alt=""> in the body I get an image Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Christian Views Home</title> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <META http-equiv="imagetoolbar" CONTENT="no"> <link rel="stylesheet" href="stylesheets/ChristianViews.css" type="text/css"> </head> <body> <img src="images/background_2b.jpg" alt=""> </body> </html> Code: * {padding:0; margin:0;} ul {margin-left:20px; padding-left:0;} body { background-image:url('images/background_2b.jpg'); } h2, h3 { color: #aa8800; } Can't be more simpler than this ! Hey all, I'm looking to create a simple CSS layout design with a title bar running across the top, with the title picture/text in a middle column and then a middle column running down the centre of the page, something like this. Can anyone tell me how I can do that, with the top bar/title and the central title/main column? Thanks. I'm new to web development and I'm trying to figure out how to make my page a set width, if the view size is less than a certain amount I want the width scroll bar to appear as opposed to the default which rearranges everything? Some examples of what I'm talking about: youtube stackoverflow darkroastedblend (can't post urls) Can anyone point me in the right direction or show me how this is done please? |