HTML - Centering A Website - Liquid
Hi,
I am building a website and would like to make it liquid. The website address is: http://www.cse.dmu.ac.uk/~p04283218/mainframe9/ Can anyone point me in the right direction as to how I would do this please. Thanks. Similar TutorialsHi, I am trying to create a liquid website. I have drawn up a prototype on paint and the image is attached. Can anyone help me to turn the prototype into a website? Thanks, Hi, Have just uploaded a new website. In Safari, Opera and Firefox the webpage floats in the middle of the browser page, as I want it to. In some versions of IE its sits to the far left. Here is the page: http://www.ironworksstudio.co.uk/ And here is the CSS: Code: *{ margin: 0; padding: 0; } body{ font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 15px; color: #000000; background-color:#000000; } #container { margin-right: auto; margin-left: auto; margin-top: 15px; width: 700px; background-color:#000000; } p{ padding-top: 10px; font-size: 13px; line-height: 18px; } #header { margin-right: auto; margin-left: auto; margin-bottom: 0; height: 100px; width:700px; background-color:#000000; padding: 0 0 10px 0; } #menu ul{ margin-left:0; font-family: Helvetica, Arial, sans-serif; font-size: 14px; background-color:#FFFFFF; } #menu li{ text-align: center; text-decoration: none; color: #ffffff; background-color: #000000; list-style-type: none; width: 84px; height: 20px; padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom; 3px; margin-right: 2px; margin-left: 2px; float: left; border: 1px solid; } #menu li:hover { color: #ffffff; background-color: #333333; } #menu li a { text-decoration: none; color: #ffffff; } #menu li a:hover { color: #ffffff; } #footer { font-size:12px; font-family: Helvetica, Arial, sans-serif; width: 700px; margin-right: auto; margin-left: auto; clear: both; background-color:#000; color: #FFF; } #top_image { margin-bottom:20px; clear: left; background-color:#000000; } #menu { float: left; width: 700px; margin-bottom:10px; background-color:#000000; } #two_column { font-size:12px; font-family: Helvetica, Arial, sans-serif; line-height:1.4; margin-top: 10px; margin-bottom: 50px; float: left; width: 700px; text-align: left; background-color:#000; } #l_column { font-size:12px; font-family: Helvetica, Arial, sans-serif; color:#FFF; line-height:1.4; margin-top: 10px; margin-right: 30px; margin-bottom: 50px; float: left; width: 335px; text-align: left; background-color:#000; } #l_column a{color:999999;} #r_column { font-size:12px; font-family: Helvetica, Arial, sans-serif; color:#fff; line-height:1.4; margin-top: 23px; float: right; width: 335px; background-color:#000; padding: 0 0 10px 0; } .left { font-size:12px; font-family: Helvetica, Arial, sans-serif; width: 335px; float: left; text-align: left; border: 2px solid #000000; border-collapse: collapse; background-color:#000000; } .right { font-size:12px; font-family: Helvetica, Arial, sans-serif; width: 335px; float: right; text-align: left; border: 2px solid #000000; border-collapse: collapse; margin-top:12px; background-color:#000000; } th { font-weight: bold; font-size:13px; color: #000000; background-color:#FFFFFF; padding: 5px; } td { padding:5px; } tr { color:#FFFFFF; } .rowstyle1 { border-bottom:1px dotted; } #gallery { background-color:#000; width: 680px; padding-left: 0; } #gallery ul { list-style: none; margin-left: 0; } #gallery li { padding-left:1.2px; } #gallery ul li { display: inline; padding-right: 0; } #gallery ul img { border: 0; border-width: 0; } #gallery ul a:hover img { border: 0 solid; } #gallery ul a:hover { color: #cccccc; } hr {color:#333333; border-style:normal; padding: 0 0 0 0; margin: 0 0 10 0; } h2 {color:#ffffff;} </style> Here is the code i have for the only(and first) page of the website. HTML Code: <!DOCTYPE html> <html> <body background="piginsun.png"> <div id="container" style="width:1903px"> <div align="center"> <div id="header" style="position:relative;width:100%;margin-top:0px;margin-bottom:0px;text-align:center"> <h1 style="margin-bottom:0;"> </div> <div style="width:340px;text-align:left;align:center;"> <a href="http://www.w3schools.com"><img width="868" height="90" src="mcad.png" alt="html.html" style="border:0;margin-top:0px;"></a> <div id="menu" style="height:315px;width:120px;float:left;"> <b><a target="_top" href="html.html">Home</a></br></br> <b><a target="_top" href="html_forums.asp">Server Forums</a></br></br> <b><a target="_top" href="html_updates.asp">Server Updates</a></br></br> <b><a target="_top" href="html_videos.asp">Server Videos</a></br></br> <b><a target="_top" href="html_staff.asp">Server Staff</a></br></br><b><a target="_top" href="html_pics.asp">Server Pictures</a></br></br> <b><a target="_top" href="html_donate.asp">Donations</a></br><b></br><a target="_top" href="html_contact.asp">Contact Us</a> </div> <div id="content" style="height:940px;width:1200px;text-align:center;"> <font size=40px;font color="#7373FF">Random</font><font size=40px;font color="#CB59E8">Craft</font></br> <i>A Minecraft Server</i> </br> <div id="content" style="height:598px;width:1200px;text-align:center;"> </br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br> <div id="footer" style="clear:both;text-align:center;"> Copyright ®RandomCraft Server</div> </div> </body> </html> I need some help centering the whole thing. It looks good now but is off to the side, i need it centered. If someone could show me how to do that, that would be awesome. Thanks Hi. First off I'm new to this forum so Hello! I wanted to know how to make sure my websites 'float' in the middle of the screen, like this for example http://www.richardjohntaylor.com/billymurray i.e. whatever size the window, the image always remains centred. The website above is only a single image. How would I do it with my other sites, which are tables making up many images, eg. http://www.terrystone.biz or http://www.trconsultants.co.uk I edit using Dreamweaver. Thanks Richard hello there can someone please give some advice / fixes for centering my website in IE and Chrome etc I programmed it in Dreamweaver and previewed it in Safari and Firefox where it looks lovely and central, however people have told me that in IE it is centered to the left. I can't figure out how to fix it. http://www.formconstant.co.uk any help would be greatly appreciated john Hi. I don't know how to center my website, so it works in all browsers. Take a look he www.AURecords.com It only works on computers with a high screen resolution. Any suggestions? Christian Hello, I wont call myself a website designer, but I do design my own websites. My problem is my website is only centered when monitor setting is at 1024 x 768. If an outside viewer with different monitor settings views my sites it will be really off-centered. I design all my websites in photoshop then code them with macromedia. Is their a code I could include into the html to keep my webpages centered no matter what size screen is viewing? Would appreciate any comments, JJ Hi Everyone, I'd like to learn the details about liquid layout and like to know how to develop the liquid layout site like timberland[dot]com. Looking forward for your ideas... Thanks... Yespee Hi everyone. I am trying hard to use liquid design in my websites, so when I have a gallery of thumbnails, I want the number of rows of thumbnails to adjust according to the window size, avoiding horizontal scrolling. If you go to this url: http://www.surecarehomehealth.com/pa...ttheteam.shtml, you will see that resizing the window will do what I want it to. However, if you click on the first thumbnail, after opening that page, the thumbnails no longer adjust as desired. It seems that having that large image on top prevents this, but why? I can't figure it out. I can't see what would be preventing the thumbnails from collapsing to fit inside the window. Can anyone tell me why this is? Thanks. Hello! I recently uploaded a site I've been working on in Dreamweaver- www.gmerch.net My question is about templates. Currently the page will display with the main content below the nav bar, and not to the right. I suspect this is an issue of having a liquid template and not a fixed one. Am I on the right track here? Is there a way to switch to fixed without having to copy all of the site content into a new document? Thanks! Toby Aloha! Would anyone kindly review this simple html and tell me why the liquid layout doesn't work? Thank You. Uldra <html> <head> <title>Mystical Reflections</title> <meta name="description"content="The Artistry of Uldra Johnson"> </head> <body bgcolor="black" text="silver" link="purple"> <div align="center"> <table cellpadding="16" width="100%" border="0" cellspacing="0"> <tr> <td width="30%" align="center"> <td width="100%" align="center"><font face="chopinscript" size="+4">The Artistry of Uldra Johnson</td> <td width="0%" align="center"> </tr> <tr> <td width="30%" align="center"><font face="chopinscript" size="+4"> Shinay</td> <td width="40%" align="center"><font face="chopinscript" size="+3">All of my art<br> - my photography, my artifacts, as well as my writings and music -<br> is born of spirit, and its intent is spiritual.</td> <td width="30%" align="center"><font face="chopinscript" size="+4"><a href="photodirectory.html">Photography</a></td> </tr> <tr> <td width="30%" align="center"></td> <td width="40%" align="center"><img src="shinayreduced3.jpg"></td> <td width="30%" align="center"></td> </tr> <tr> <td width="30%" align="center"><font face="chopinscript" size="+4">Writing</td> <td width="40%" align="center"><font face="chopinscript" size="+3">May it touch your ruby heart,<br> and dance with your diamond mind.</td> <td width="30%" align="center"><font face="chopinscript" size="+4">Artifacts</td> </tr> <tr> <td width="30%" align="center"><font face="chopinscript" size="+2"><u>Contact info</u></td> <td width="40%" align="center"><img src="beig.gif"></td> <td width="30%" </td> </tr> </table> </div> </html> Hi all, I'm trying to create a liquid design using tableless design, but im having a slight problem. I'm aware that you should use a div tag and set the width in percentages but i have two images in the header, so while the header div is set to 100% the images inside arent and therefore the website only works on the computer i have developed the website on. Is there a way around this problem. I have pasted the header code below: Code: <div id="header"> <img src="Images/spacer.gif" width="34" height="1" border="0" /> <a href="Index.html"><img src="Images/Header1a.jpg" alt="Angies Florida Villa - Rent Our Luxury Villa At A Low Price!" width="587" height="130" border="0" /></a> <a href="#"><img src="Images/Header_3.jpg" alt="Angies Florida Villa - Rent Our Luxury Villa At A Low Price!" width="480" height="130" border="0" /></a> </div> Code: #header{ background-color:#FFFFCC; border-style:solid; border-color:#000000; border-width:1px; height:130px; width:100%; } hello, i need a website for german customers, somethign like www.podmod.de because i would like to offer the same. So if anyone has an idea where to start, or even can offer me something i can buy, please do so. my email: verenamueller999@web.de thanks verena. I have some links (in the header, the SUPPORTERS) to different websites, but when I click on them the address in the address bar does not change to the address of the website that I clicked. How do I make it show the address that I clicked on? Thanks. http://www.ac.wwu.edu/~fencing/ I am a total noob but volunteered to administrate the website, because there was no one else to do it. Hi How to add a website counter to my website. So that when ever a visitor visits the website I want the counter to increase say from 101 to 102 and then for a new visitor it should be 103 and then again for the next visitor 104 and so on..... I want to know the code. There are number of websites that are offering this but they put their advertisement which I don't want Hi, I am trying to find a way in which a website that is linked on my homepage can be opened while keeping at least one form of my homepage open as well. e.g.: Google images :http://images.google.com/imgres?imgu...en-us%26sa%3DG sorry for the massive link. Hope you get the idea. So what i want is to have a bar on top that is my homepage (like the google bar in the link), but the rest is the actual website that has been linked. I don't really care much about the url. It doesn't have to be my homepage url, it can be the actual website url. Google has been able to do that somehow, so it is possible. I would just like to know how and if it is hard to do. If someone knows how to do it, it would be great if you could give me a link to a tutorial, or explain it. thanks so what is the easiest and best way to center a div within a div? or a div within anything else for that matter. How do you center vertically? and How do you venter horizontally? I have a website and I used css to make my Div tags set to absolute. The only problem is that when you open it in a browser, the browser won't open big enough and wil block out some of my content (forcing me to scroll to the left or maximize the borswer to see the whole page) . How do i make the divs always appear in the center of the page always. Also how do i make it so when you change the siz of the browser my divs will change with it to remain in the center. I tried doing the margin auto trick but it still doesn't work. Here is my stle sheet code and the web page html code... any help would be appreciated. /* CSS Document */ #wrapper {margin-right: auto; margin-left: auto; margin-top: 20px; margin-bottom: 0;;} body { margin : 0px 0px 0px 0px; background-color: #E1AE5A; background-repeat: repeat; } #top { position: absolute; height: 48px; width: 900px; left: 250px; top:3px; border:0px none; z-index:1; color: #000033; } #main { position: absolute; top: 542px; left: 328px; z-index:5; width: 745px; color: #FFFFFF; height: 28px; } #flash { position: absolute; top: 130px; left: 299px; z-index:4; width: 803px; color: #FFFFFF; height: 419px; } .style1 { font-family: Eurostile; color: #FFFFFF; } .style2 { font-family: Helvetica; } #Layer1 { position:absolute; left:300px; top:121px; width:804px; height:540px; z-index:3; background-color: #000033; border: medium solid #FFFFFF; } .style3 { font-family: Eurostile; } #Layer2 { position:absolute; left:111px; top:170px; width:71px; height:124px; z-index:4; } .style4 {color: #000000} #Layer3 { position:absolute; left:482px; top:72px; width:37px; height:56px; z-index:2; } #Layer4 { position:absolute; left:652px; top:72px; width:24px; height:31px; z-index:2; } #Layer5 { position:absolute; left:822px; top:72px; width:84px; height:58px; z-index:2; } #Layer6 { position:absolute; left:992px; top:72px; width:95px; height:50px; z-index:2; } #Layer7 { position:absolute; left:331px; top:139px; width:750px; height:446px; z-index:9; } #Layer11 { position:absolute; left:319px; top:72px; width:12px; height:10px; z-index: 2; } #Layer8 { position:absolute; left:302px; top:98px; width:791px; height:48px; z-index:10; } #Layer9 { position:absolute; left:299px; top:40px; width:32px; height:20px; z-index:0; } #Layer10 { position:absolute; left:1016px; top:595px; width:24px; height:26px; z-index:10; } and the html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" land="en"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="styles.css" rel="stylesheet" type="text/css"> </head> <body> <div id="top"> <h1 align="center" class="style3 style4">on The side, Inc. </h1> <p align="center" class="style3"> </p> </div> <div class="style2 style3" id="main">on The side is a value added promotional marketing organization focused on working with companies to make them more market-facing. We take time to learn about our clients' business model, industry and previous marketing agendas before taking a next step OR leap - if necessary.</div> <div id="Layer1"></div> <div id="flash" align="center"> <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="425" height="400"> <param name="movie" value="main.swf"> <param name="quality" value="high"> <embed src="main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="425" height="400"></embed> </object> </div> <div id="Layer3"><a href="who.html"><img src="who.jpg" width="100" height="70" border="0"></a></div> <div id="Layer4"><a href="what.html"><img src="what.jpg" width="100" height="70" border="0"></a></div> <div id="Layer5"><a href="ideas.html"><img src="ideas.jpg" width="100" height="70" border="0"></a></div> <div id="Layer6"><a href="why.html"><img src="why.jpg" width="100" height="70" border="0"></a></div> </body> </html> how can i center the nav on this page? http://fantasyfootball.pzproductions.com/testing |