CSS - Different Layouts On The Same Site Design
So here is my question and dilemma.
In almost every design you want the same layout for all the pages so one css style sheet is really all that is needed unless you are providing a different browser support or a different media option. However, lets say inside that site you want a page that will have a photo gallery or embedded videos. So then you may need to lay out a bit of a different layout for that page and its content. Is it better to just have those declarations in the same external style sheet, then applying it to that one page; or should it be placed in a separate css style sheet just for the page or because it is so isolates should it be placed in the xhtml internally? I would think placing in in the xhtml would not be a good idea but the other two options is bit more gray LB Similar TutorialsI've been reading over a bunch of threads and CSS vs. table websites & articles, all with varying degrees of CSS fanatiscm to "long-live-tables" viewpoints. I too am trying to make a decision on how to embark on a new site strategy. I think for most developers, re-coding an existing site to full CSS is probably not cost effective. I'm using CSS for everything except positioning right now. So my question is, how are you approaching from-scratch NEW site development layouts? Well, I know CSS however I am a bit confused with fixed width and liquid layouts as far as I know fixed width is where you set a divs width in pixels and liquid is in % so it scales to the users screen size? Which one is best to use? Also, I have the following style sheet which I created, I am guessing this is a liquid layout? Code: * { margin: 0; padding: 0; } body { font-size: 15px; background-color: black; color: white; } #header { width: 100%; margin-bottom: 10px; border-bottom: 1px solid white; } #header h1 { padding-left: 25px; margin-bottom: 0px; } #content { padding: 10px; margin-left: 200px; border-left: 1px solid white; } #content h1, h2, h3, h4, h5, h6 { text-align: center; } #nav { float: left; padding: 10px; padding-left: 15px; width: 20%; } #nav li { list-style-type: none; } #nav a { text-decoration: none; } #footer { clear: left; border-top: 1px solid white; margin-top: 10px; margin-bottom: 10px; border-bottom: 1px solid white; width: 100%; } a { color: silver; text-decoration: underline; } a:hover, a:focus { font-weight: bold; } a:visited { font-style: italic; } h1, h2, h3, h4, h5, h6 { margin: 10px; } p { margin: 5px; } select { width: 30%; } textarea { width: 40%; } .floatimage { float: left; margin: 10px; } Hello - My name is Steve Douglas website designer for AAA Northwest Ohio. I'm 19, and learning as I go - AAA paying for any courses that I need to take, but i'm not the school type of guy. I like to learn it by self-studying; i learn it better by making my own mistakes. Anyways were doing a site re-design, I first started off with a simple re-design with just HTML and tables (whoopity doo), boss was impressed - I was not. I hated it. But - I'm doing a new site design now with CSS, learned how to code it overnight. I started the designing and had wierd errors all around with browser related issues, I would re-design, re-design, and re-design until everything worked Perfect in all Screen Resolutions, IE 5.0, IE 6.0, IE 7.0, and Firefox I got advice from a fellow devshed guy kasmatu (spelling could be off), but helpful guy, gave me the clue to get the Mozilla Firefox Extension for CSS [Love It!]. Now should I follow these tools by heart? I mean like if I click Tools then Validate CSS, and Validate HTML, and Etc. 1. I am at a state where my header finally looks great in all popular browsers, but when I validate my CSS it's saying i'm missing a </div> at line 40 - Which is True! but when I go to add it, um, yea doesn't like that - all ID's are totally screwed from there after. not even the header looks right. And it doesn't look like a simple fix. I mean it's working! - So why should I want to validate my CSS? ALSO - and this is prolly why.. How do I speed up the site? Our Current site that we are using, is running 98 seconds loading time for Dialup users (a minute an a half!). The new CSS is at 45 seconds for Dialup users (i think). I'm pretty sure it's to do with all the Javascripts i'm using, I'm planning on combining the Scripts together and taken out code I do not need. But the document sizes are still huge. --------- I'm looking into HTTP Compression for our server - is this smart? we are running on a windows 2000 server IIS - What are the negatives to installing the compresser? ---------- Here is the site re-design http://www.aaanwohio.com/test/together.php Our Current Site is located at http://www.aaa.com/stop - Zip Code 43465 I know its a bit vague but if someone can actually HINT on what is wrong with the design as it looks ok in FF and IE7 and major other browsers however in IE6.0 the divs (basket and best seller and donate) have moved to the right a bit more. In Opera9.0 it looks very messy. IE: http://browsershots.org/screenshots...1b07da5ea24003/ Opera: http://browsershots.org/screenshots...e171bac56fbf14/ Original: http://www.zahra-zahra.com/aboutus.php look at my site. it is very boxy and almost TOO structured. is there a design trick i can use to mix it up a little? specific examples would be greatly appreciated. This is driving me absolutely insane. The transition from table designs to css designs is a brutal one, in case no one is aware. Table designs seem so much easier, but I guess I might as well be compliant. Here's my problem: All I need to do is have a three column box that has a select box in the left column, then two images vertically aligned in the middle within the middle column, and a second select box in the right column. This would be incredibly easy with tables seeing that all I would need is: Code: <table> <tr> <td align="left"> <select> <option>Option</option> </select> </td> <td valign="middle" align="center"> <img src="picture1.jpg"/><br/> <img src="picture1.jpg"/> </td> <td align="left"> <select> <option>Option 2</option> </select> </td> </tr> </table> I'm assuming that since it's this easy to do with tables and everyone is opposed to using tables for design, there must be an easier way using divs and the like. Please enlighten me, someone! I think it would answer a lot of questions if we make a list of cross browser css layouts. I am going to post all of my submissions via http://www.blendedcodes.com so everyone can see a live demo and change the code around live. Please post your submissions via blendedcodes.com or a similar site that lets visitors interact with the code. This is all about everyone learning the css layouts... I'll compile them all and post the final list when I close the thread. Centered body with left and right columns http://www.blendedcodes.com/DTrzZ6In Table made of floating divs http://www.blendedcodes.com/CFwtV3S1 Hi, Am very new to CSS, and need some advice. Broadly speaking, how would I achieve this layout using purely CSS? Thanks in advance http://forums.devshed.com/attachmen...tachmentid=4990 I've been thinking about switching over to making table-less css layouts, but there's been a few things holding me back, as I'm not sure if they're possible. Firstly, can you have two fixed width divs on the sides of a variable width div, which will stretch to fit the screen? Something like this is generally what I mean: Code: <div style="width: 50px; float: left;">left</div> <div style="width: *; float: left;">middle</div> <div style="width: 50px; float: left;">right</div> Also, is there any way to make a div that has been placed to the right of another match the height of the the one to it's left? Basically, I want it to behave more like standard tables do in that every cell in a row is the same height. Is this possible? First off I am entirely new to using CSS for anything other than some link and scroll bar decorations. Secondly, this code does not (currently) validate but I think I can resolve those issues, but before I go to the trouble of appeasing a (forum) guideline and making sure the code validates I have some questions that may or may not prevent me from using the code or CSS all together. The code (template/stle sheet) I am using is from http://www.code-sucks.com/css%20layouts/css-3-column-layouts/ the top question I have now is: How can I seperate elements within the "header" section of this format? i.e. within the "header I would like to place a logo to the far left + a slogan and also place an advertising banner? normally I would do this with three or more table cells. would it compromise the benefit of switching from mainly table oriented pages to CSS by including "some" tables within the CSS sections? Thanks for any insights and sorry if I have crossed any lines with this query. i have been for 7 years now developing websites using tables and CSS, and nowadays i realized that i should use <DIV>s to create layout for my websites as it will be faster and SEO friendly. so can you please tell me any tutorials that teach me how to build a website using <DIV>s? and do someone know whether Lynda offers this or not? I've got two pages, one created using tables for layout, and one using css . With the text columns in the tables layout, as you can see, no matter how much text you put in either column, the grey-background container will be pushed down. However, with the text columns in the css layout, I had to float the right column to the right in order to display the two columns together, and therefore, if you have more text in the right floated column, adding more or less text does not push down the height of the grey-background container. Can anyone tell me how I can fix this while allowing for random amounts of text to be displayed in either column, in the layout? I'm having an issue with a CSS layout I"m working on. 1.For some off reason the div element for my page footer appears to think its inside of the mbox div. no matter what I have tried I can't get the pagebot div to the bottom of browser. 2. Width of 100% still leaves 30 or so px's on the right, any reason for this? 3. setting a min-height of 500 or so for mbox or innerbox divs has been ignored. Code: <html> <head> <title>Untitled</title> <style> #container { position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; } #pagetop{ position: relative; top: 0px; background-color: #ADD8E6; width: 100%; height: 65px; } #pagebot { position: relative; background-color: #ADD8E6; height: 65px; clear: both; } #mbox { position: relative; border: 5px solid #000; } #innerbox { position: relative; left: 10px; } div{ border: 1px solid red; } </style> </head> <body> <div id="container"> <div id="pagetop"></div> <div id="mbox"> <div><img src='imgs/logo_tot_grey.jpg' width='280' height='95' alt='' border='0'></div> <div id="innerbox"> <p>Test</p> </div </div> <div id="pagebot"></div> </div> </body> </html> I am looking for a CSS tutorial which teaches how to make a layout like this layout Basically a 3 column layout with boxes in the left and right columns Thanks Hi there, I wanted to make buttons for my menu but I didn't want to use a lot of bandwidth so I decided to use Layouts and use the same image button over and over again! I made it in FrontPage with a great success but at the end I found out that the layout doesn't work in FireFox, the writing is all over the place in FireFox. Here is the code: Code: <div id="logo" style="position:absolute; left:-1px; top:20px; width: 171px; height: 45px;"> <p align="center"><font face="Tahoma" size="2">TEST LAYOUT</font></div> <p> <img border="0" id="img1" src="../button22.jpg" height="30" width="150" alt=""></p> If you apply it in IE it works, but if you apply it in Firefox it doesn't work. Thanks in advance for your help and support. Best Regards, John Is it more common practice to place all div's within one div as seen he Or to have all div's independent, as shown he Let me explain a little what I need to do. I need to make table cells use images. Easy enough using background-image. The problem is, I need a left end and right end for the table. make sense? i want to enclose the image so there's an ending on it. The only way I've seen this done is using table layouts. upper row has 3 cells. one on each end for ends, and one in the center for the stretch. Is there a way to do this in CSS, so I can somehow have this drawn out? I mean How's this done? I see it on modules for nuke pages all over the place. But there has to be more to it than physically coding a table each section right? Alright, so ive been around the block for a while and have heard that table layouts for design are the worst thing possible. However, I have noticed more and more sites using tables for the block type layout in a site... and then using css within the table blocks. I tried it out on a site I'm working on, and it is honestly the easiest way I've ever made a template... and it works in IE6 & 7, and FF. One of my favorite sites and layouts is CBSSports. And they use a table layout to accomplish what they are doing. Any reasons on why it is really that bad to do for example, what CBSSports is doing? |