CSS - Slice From Psd And Make A Tableless Css Template
Hi guys
I was given the task to slice a design in Photoshop and then to make a CSS tableless template. I would like to know where to find some nice newbie tutorials about how to make this. The following image is part of the main design that has to be converted to CSS website And following is the code of one of the template files that the custom CMS has. Code: <br /> <div class="websiteintro" style="width:700px; margin-left: auto; margin-right: auto;"> <!-- <div class="htmlcontent"> <div style="text-align: center;"> <span style="text-align: right;"> <span style="font-weight: bold; color: rgb(204, 0, 0);">Citaat van de week...</span> </span> <br> <span style="text-align: right;"> <span style="margin: 0cm 0cm 0pt; text-align: right;"> '{textfragment naam="citaat_van_de_week"}' </span> </span> </div> </div> --> </div> <br /><br /> <table id="homepagecontent" border="0" width="700" cellpadding="0" cellspacing="0"> <tr align="left" valign="top"> <td width="234"> <div style="margin-bottom:20px;"> <h1><strong>Laatste nieuwsberichten</strong></h1> {zoek_nieuws limiet="5" sorteer="datum_creatie DESC" var="nieuwsberichten"} {foreach from=$nieuwsberichten item=nieuws} <strong>{$nieuws->datum_creatie}</strong>: <a href='{$nieuws->link}'>{$nieuws->titel}</a><br /> {/foreach} </div> </td> </tr> </table> <h1>. . .</h1> I'll apreciate any urls or info you can give me. Thanks a lot in advance. Similar TutorialsHi! I'm wondering how to you convert this table data to a tableless data?? Code: <table> <tr> <td>1-Part Receipt Paper (8100 per box)</td> <td>$77.55</td> </tr> <tr> <td>2-Part Receipt Paper (4800 per box)</td> <td>$90.75</td> </tr> </table> Thanks... Edit: That confirm to W3.org standard and right/left justify?? Looking for a little help here in the best way to slice up this layout and code the CSS for it. I'm not a professional, but I've been a website tinkerer for about 12 years. I think this is going to require the use of layering with z-index tags, though I'm a little worried how compatible that is with the various browsers. The oval logo and the nav bar will need to lay "on top" of the rest of the site (well, that seems like the easiest way of doing it to me). The image above the logo/navbar (the fall leaves) may be a random image script. And the image below the logo/navbar (the house) will be pulled at random also from a database of real estate listings. So, the random factor kinda causes me to want to do the z-index thing, otherwise it will complicate things by having to slice up the logo to add to the random images. The problem then is how compatible that will be with less than desirable browsers. Here's the look I'm going for: Any help or suggestions would be greatly appreciated. Thanks! Guys.... I am newbie in CSS tableless design and I wanna build a website w/o tables..... JUST CSS... Well, I have been working hard on this but I can make it work... Here is the design that I wanna build... and here is the code that I have so far... PLEASE... some CSS GURU answer this puzzle... Thanks.. [code] /* CSS Document */ body { margin: 0; padding: 0; font: normal 0.7em/1.4em Tahoma, Verdana, Arial, Georgia, sans-serif; color: #7c7c7c; text-align: center; background-color: transparent; background-image: url(images/background.jpg); background-position: center top; } #container-main { margin: 0px auto; padding: 0; width: 648px; border: none; text-align: left; background-position: bottom; } #container-top { margin: 0px auto; padding: 0; width: 648px; border: none; text-align: left; background-position: bottom; } #left { width: 20px; background-image: url(images/l-shadow.jpg); float: left; height: 543px; } #main { border: none; background-image: url(images/header.jpg); float: left; width: 598px; height: 67px; } #right { width: 30px; background-image: url(images/r-shadow.jpg); height: 543px; float: right; } /* #container { position:absolute; left:0px; top:0px; width:100%; height:100%; background-image:url(images/background.jpg); } */ #e-mail-templ-final2-01_ { position:absolute; left:0px; top:0px; width:81px; height:600px; } #top_ { position:relative; top:0px; width:648px; height:57px; background-image: url(images/top.jpg); } #background_ { position:absolute; left:729px; top:0px; width:243px; height:600px; } #e-mail-templ-final2-04_ { position:absolute; left:81px; top:57px; width:20px; height:90px; } #header_ { position:relative; top:57px; width:598px; height:67px; background-image: url(images/header.jpg); } #e-mail-templ-final2-06_ { position:absolute; left:699px; top:57px; width:30px; height:90px; } #red-bar_ { float: left; width: 598px; height: 17px; background-color: #990000; border-top-width: medium; border-right-width: 0px; border-bottom-width: medium; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #FFFFFF; border-right-color: #FFFFFF; border-bottom-color: #FFFFFF; border-left-color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; color: #FFFFFF; text-align: center; } #l-shadow_ { position:absolute; left:81px; top:57px; width:20px; height:542px; background-image: url(images/l-shadow.jpg); } #title-content_ { left:139px; top:143px; width:452px; height:33px; background-image: url(images/title-content.jpg); float: left; } #ncaa_ { height:67px; background-image: url(images/ncaa.jpg); float: right; width: 146px; } #r-shadow_ { position:absolute; left:699px; top:56px; width:30px; height:544px; background-image: url(images/r-shadow.jpg); } #e-mail-templ-final2-12_ { position:absolute; left:81px; top:154px; width:20px; height:446px; } #e-mail-templ-final2-13_ { position:absolute; left:699px; top:156px; width:30px; height:444px; } #content_ { left:101px; top:180px; width:452px; height:349px; background-color: #FFFFFF; float: left; } #e-mail-templ-final2-15_ { position:absolute; left:553px; top:214px; width:146px; height:1px; } #big-pix-golf_ { left:553px; top:215px; width:146px; height:265px; background-image: url(images/big-pix-golf.jpg); float: right; } #facilities_ { left:553px; top:480px; width:146px; height:16px; float: right; background-image: url(images/facilities.jpg); } #facilities-pix_ { left:553px; top:496px; width:146px; height:51px; float: right; background-image: url(images/facilities-pix.jpg); } #e-mail-templ-final2-19_ { position:absolute; left:101px; top:529px; width:156px; height:18px; } #bottom-shadow_ { left:101px; top:529px; width:452px; height:18px; background-image: url(images/bottom_shadow.jpg); float: left; } #e-mail-templ-final2-21_ { position:absolute; left:262px; top:529px; width:291px; height:71px; } #e-mail-templ-final2-22_ { position:absolute; left:101px; top:547px; width:19px; height:53px; } #lu-seal-bottom_ { position:absolute; left:186px; top:365px; width:137px; height:53px; } #bottom-backg_ { left:101px; top:547px; width:598px; height:53px; background-image: url(images/bottom-backg.jpg); float: left; } #e-mail-templ-final2-25_ { position:absolute; left:553px; top:547px; width:47px; height:53px; } #apply-now_ { position:absolute; left:434px; top:390px; width:86px; height:53px; } #e-mail-templ-final2-27_ { position:absolute; left:686px; top:547px; width:13px; height:53px; } Hi friends, I am trying to avoid tables but what I would do in 1 minute now I need hours Can you help me? What I get is here... not exactly what I expected. My CSS is here Thank you for your time and help. Hi, Learning CSS and trying to convert a table layout to DIVs. Example..... PHP Code: x---------------------------------------------------------x | | | Banner | | | x---------------------------------------------------------x | Nav 1 | Nav 2 | Nav 3 | Nav 4 | [Nav graphic] | Nav 5 | x--------------x------------------------------------------x | | | | Menu | | | (Fixed | Introduction | | Height) | (Fixed Height) | | | | x--------------x------------------------------------------x | | | | | | | Main Text | | (Auto Height - So it can expand) | | | | | | | x-----------------------------------------x---------------x | Closing Text | Photo | | (Fixed Height) | (Fixed | | | (Height) | | | | | | | x---------x-------------------------------x-----x---------x | | Graphic Footer Bar | | x---------x---------x-----------------x---------x---------x | | | Stats Bar | | | | | | | | | x---------x---------x-----------------x---------x---------x | | | Text Nav Bar | | | x---------------------------------------------------------x Problem: How do I align the vertical columns (nav buttons especially)? I don't know enough about DIVs to know how to align them flush against each other. That's 6 columns of graphic images. Could someone post a code example to learn from? Heads up welcome. I'm trying to make a box without table but i'm having some problems with the div's of the lateral columns. Look -> here I saw that if i want to use a percent value on height style in the div element, it's parent element must have the height element in pixels unit. But i don't want the height adjusted previously, the content in the box could do itself. thanks in advanced Code: body { background:white; margin:0px; margin-top: 5px; margin-left: 5px; padding:0px; text-align: center; height: 100%; } #caixa{ width: 400px; } .esquerda_1{ float: left; width: 38px; height: 26px; background:url(img/q1_1.gif) no-repeat top left; margin:0px; margin-right:-3px; } html>body .esquerda_1 { margin-right:0px; } .direita_1{ float: right; width: 38px; height: 26px; background:url(img/q1_3_semtitulo.gif) top right; margin:0px; margin-left:-3px; } html>body .direita_1 { margin-left:0px; } .meio_titulo{ width: 100%; height: 26px; background:url(img/q1_2_shin.gif) repeat-x; } .esquerda_2{ float: left; width: 4px; height: 100%; background:url(img/q2_1_shin.gif) repeat-y top left; margin:0px; margin-right:-3px; } html>body .esquerda_2 { margin-right:0px; } .direita_2{ float: right; width: 4px; height: 100%; background:url(img/q2_2_shin.gif) repeat-y top right; margin:0px; margin-left:-3px; } html>body .direita_2 { margin-left:0px; } .meio{ width: 100%; background:url(img/q2_bg.gif) repeat; } .esquerda_3{ float: left; width: 6px; background:url(img/q3_1.gif) no-repeat; margin:0px; margin-right:-3px; } html>body .esquerda_3 { margin-right:0px; } .direita_3{ float: right; width: 6px; background:url(img/q3_3.gif) no-repeat; margin:0px; margin-left:-3px; } html>body .direita_3 { margin-left:0px; } .meio_rodape{ width: 100%; background:url(img/q3_2_shin.gif) repeat-x; } </style> </head> <body> <br /><br /> <div id="caixa"> <div class="esquerda_1"> </div> <div class="direita_1"> </div> <div class="meio_titulo">aasdfsadfasd </div> <div class="esquerda_2"> </div> <div class="direita_2"> </div> <div class="meio"> aasdfsadfasd aqui bla bla <br /> aqui bla bla<br /> bubu sdlkfjs dk<br /> alkakl WOWOWOW </div> <div class="esquerda_3"> </div><div class="direita_3"> </div><div class="meio_rodape"> </div> </div> Does anyone know how to do the following without tables - I need to align some text to the left, some in the center, and some on the right, all on the same line: E.g. Code: ---------------------------------- LEFT CENTER RIGHT ----------------------------------- I messed around with float, but the text to be aligned to the right always appears on the line below. Thank you for any help you may provide I am designing a login box for my web page and have seen how to do it with tables but was wondering if CSS is a better way to do it. With a tables I set up a table with 4 cols and 3 rows. 1st row had the title spanned across both columns, 2nd row had "username" in first col and textbox in second col, 3rd row had "password" in first col and textbox in second col and the 4th row had the login button in the second column. With CSS I've made a div to hold the content and inserted a div for the titlebar. Do I now just keep placing divs inside this content div for the rest of the elements? Is this a good way to approach the login box or should I just put a table inside the original div? Hi all, After using silktide.com to test my site's score, the report suggested that I remake the site using CSS to make it tableless. The site i am remaking is www.verdicts.co.uk So far ive remade the interface which you can see he www.verdicts.co.uk/verdicts_css Problem is, i have absolutely NO clue how i would go about making much more complex table replication using CSS. For example, the "popular review catagories" as seen on the www.verdicts.co.uk homepage. ...Or the product listing pages like this one: http://www.verdicts.co.uk/items/663/items.html or how about the reviews tables as seen he http://www.verdicts.co.uk/reviews/1140/1140.html What i am asking, is: Should i try and find a way to recreate these tables with CSS, or is the only way to do this, with *some* use of tables? Silktide.com's checker says make the site "tableless" - so i am guessing it's saying not to use a single table?! Thanks Mat. Can anyone tell me how to create tableless designs in CSS with example and also what are advantages on tableless as compared to tables ? Thanks in advance I've been designing web pages for 7 years now, using layout tables. I realize that it's time to let go with them now. Do you recommend any good book about this? I've red Ben Henick's article on Alistapart (http://alistapart.com/articles/12lessonsCSSandstandards). Do you know if he has written any books about the topic too? Hey everybody I am trying my hand at doing a tableless layout for the first time. Here is the original look of the page I am trying to convert... http://www.bleutiger.com/houstontruckclub/indexoriginal.html here is wht I have so far... http://www.bleutiger.com/houstontruckclub/testindex.html and my css file is... http://www.bleutiger.com/houstontruckclub/testindex.css What am I doing wrong? I realize that I have not included all of the content but I am having trouble with a couple of things... I built a container to hold the entire page.. I put a second container called "header" that holds... three more div's.. MainTitle Spacer MainNav that part is working fine with all of the formating. THe next container "Header2" is suppose to have two columns in it but I can't get them to float to the left and right the way they are supposed to? Help!!! Hi Does anyone here written any article on creating tableless (web 2.0) interfaces with CSS only? I want to learn CSS so that I can get rid of tables and can design sites based on pure CSS and valid xhtml. any specific links on this topic are highly appreciated. thanks I'm trying to make a feedback form using CSS instead of tables. It works fine with a label and an input box. i.e. just 2 columns I come unstuck when I try to add an extra box on the right to make 3 columns. (<DIV ID="help">) I can't seem to align it correctly or size it correctly. html4strict Code: Original - html4strict Code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <TITLE>Test CSS Form</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <STYLE TYPE="text/css"> <!-- #FormInterest label,#FormInterest input { display: block; width: 150px; float: left; margin-bottom: 10px; } #FormInterest label { text-align: left; width: 200px; padding-right: 20px; } #FormInterest br { clear: left; } #FormInterest form { border : 1px solid #000; padding : 5px; background-color : #ffc; } #help{ width: 150px; float: right; border : 1px solid #000; padding : 5px; background-color : white; } --> </STYLE> </HEAD> <BODY> <P CLASS="smltxt"> > <B>Register your interest</B></P> <P>Please use the comments box to provide your views or to register an interest in being kept informed of developments.</P> <DIV ID="FormInterest"> <FORM METHOD="POST" ACTION="/cgi-bin/genform.pl"> <INPUT TYPE="HIDDEN" NAME="form_owner" VALUE="test@test.co.uk"> <INPUT TYPE="hidden" NAME="form_subject" VALUE="Interest Form"> <BR> <LABEL FOR="name">Name</LABEL> <INPUT NAME="name" ID="name"><BR> <LABEL FOR="company">Organisation</LABEL> <INPUT NAME="company" ID="company"><BR> <LABEL FOR="email">E-mail / Telephone</LABEL> <INPUT NAME="email" ID="email"><BR> <LABEL FOR="interest">Interest Area</LABEL> <SELECT NAME="interest" SIZE="1" ID="interest"> <OPTION VALUE="Communications">Communications</OPTION> <OPTION VALUE="Healthcare">Healthcare</OPTION> <OPTION VALUE="Electronics">Electronics</OPTION> <OPTION VALUE="Instrumentation">Instrumentation</OPTION> <OPTION VALUE="Sensing">Sensing</OPTION> <OPTION VALUE="Process control">Process control</OPTION> <OPTION VALUE="Defence">Defence</OPTION> <OPTION VALUE="Security">Security</OPTION> <OPTION VALUE="Energy">Energy</OPTION> <OPTION VALUE="Transport">Transport</OPTION> <OPTION VALUE="Other">Other</OPTION> </SELECT><BR> <LABEL FOR="companyinterest">Organisation Interest Area</LABEL> <SELECT NAME="companyinterest" SIZE="1" ID="companyinterest"> <OPTION VALUE="Communications">Communications</OPTION> <OPTION VALUE="Healthcare">Healthcare</OPTION> <OPTION VALUE="Electronics">Electronics</OPTION> <OPTION VALUE="Instrumentation">Instrumentation</OPTION> <OPTION VALUE="Sensing">Sensing</OPTION> <OPTION VALUE="Process control">Process control</OPTION> <OPTION VALUE="Defence">Defence</OPTION> <OPTION VALUE="Security">Security</OPTION> <OPTION VALUE="Energy">Energy</OPTION> <OPTION VALUE="Transport">Transport</OPTION> <OPTION VALUE="Other">Other</OPTION> </SELECT><BR> <H1>Objectives</H1> <LABEL FOR="outcome">What is the desired outcome? </LABEL> <TEXTAREA NAME="outcome" ROWS="6" COLS="42" ID="outcome"></TEXTAREA> <DIV ID="help"> In the Objectives box please identify your new requirements and what you would like as the outcome of the work, that is, what might be physically produced or what might be achieved. </DIV><BR> <H1>Impact</H1> <LABEL FOR="important">Why is it important?</LABEL> <TEXTAREA NAME="important" ROWS="6" COLS="42" ID="important"></TEXTAREA><BR> <LABEL FOR="benefit">What is the benefit to UK and who would benefit from this work?</LABEL> <TEXTAREA NAME="benefit" ROWS="6" COLS="42" ID="benefit"></TEXTAREA><BR> <LABEL FOR="collaborations">Collaboration Options</LABEL> <SELECT NAME="collaborations" SIZE="1" ID="collaborations"> <OPTION VALUE="Yes">Yes</OPTION> <OPTION VALUE="No">No</OPTION> <OPTION VALUE="Maybe">Maybe</OPTION> <OPTION VALUE="No Comment">No Comment</OPTION> </SELECT><BR> <INPUT TYPE="SUBMIT" VALUE="Submit Interest" NAME="Submit1" ID="Submit1"> <INPUT TYPE="RESET" NAME="Reset1" VALUE="Clear Form" ID="Reset1"><BR> </FORM> </DIV> </BODY> </HTML> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> Hello to all, There are lots of talks lately that tables are dying. Well, I am trying to rebuild my site using tableless layout. At one point I though I was there, but here is one problem I am having (see the attached image). When a text in a right or a left column exceeds my 100% height, I loose the layout. Is there anything that I can do to fix that? Here is the html: Code: <html> <head> <title> New Document </title> <style> <!-- body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 80%; background-color: #EEEEEE; margin: 0; padding: 0; } #cssNavigationTop { padding: 10px; color: #FFFFFF; text-align: center; background-color: #330033; clear: both; } #cssNavigationBottom { padding: 5px; color: #FFFFFF; text-align: center; background-color: #330033; clear: both; } #cssColumnLeft { width: 18%; float: left; } .cssPanelLeft { margin: 10px; } #cssColumnRight { width: 18%; float: right; } .cssPanelRight { margin: 10px; } #cssContent { margin: 0 18% 0 18%; padding: 10px; background-color: #FFFFFF; height: 100%; border: 1px dotted #666666; border-top: 0; border-bottom: 0; } #cssFootNote { padding: 3px; text-align: center; clear: both; } //--> </style> </head> <body> <div id=cssNavigationTop>cssNavigationTop</div> <div id=cssColumnLeft> <div class=cssPanelLeft> cssPanelLeft <p>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</p> </div> </div> <div id=cssColumnRight> <div class=cssPanelRight> cssPanelRight </div> </div> <div id=cssContent>cssContent</div> <div id=cssNavigationBottom>cssNavigationBottom</div> <div id=cssFootNote>cssFootNote</div> </body> </html> Hi all- I m building a tableless site and am having difficulties getting the one section to fit in properly. It works great in FF but bumps down below the left nav in IE and I'm bashing my head against the wall trying to figure out which property is causing this behaviour. The majority of my audience uses IE so this is important that it displays properly See the example he http://verticalextreme.com/redesign.html CSS is he http://verticalextreme.com/_site_stylesheets/veStyle_green.css thanks in advance for any pointers! im having problem with checkboxes, they line up correctly, how to fix this Code: CSS CODE label { width: 250px; float: left; } input { float: left; width:200px; } HTML CODE <label>text1</label> <input type="text"><br> <label>text2</label> <input type="text"><br> <label>checkboxes here</label> box1 <input type="checkbox"><br> box2 <input type="checkbox"><br> box3 <input type="checkbox"><br> Hi. I'm making a registration and login pages with some additional information, and I'm wondering how to make them tableless? What I'd do with tables is put table in a table, because I want to do something like this: A 640px (or any other value) width box in the center of the screen, in which there is another box under some text, which is borderless login box. Same would go for the registration box. And without tables - I have no idea how to do it. Not sure if this is the right section, sorry if it isn't. Thanks. |