Jump to content

CSS layout external or included


legacy800

Recommended Posts

Hi,Just a quick question..When using dreamweaver what do most of you select when making a new css style? Add to head or create new css file?I'm guessing with "add to head" it's easier to work with when coding manually since you are not switching back and forth all the time between the html and the css stylesheet.(I know if not handcoding you can edit css in css styles).I'm thinking a new css file would make for better organizing, since than you have a better overview.I'm a bit new to this, so I might be getting this all wrong though.What are the ups and downs with these options and what is best to do or is mostly done?Greets,Legacy

Link to comment
Share on other sites

I don't think most of here use Dreamweaver, and standard practice is to use an external stylesheet. Most competent text editors allow you to view/edit multiple files at once, so switching back and forth between them fails to be much of an issue.

Link to comment
Share on other sites

I use dreamweaver and in nearly all situations use an external style sheet. I code the design myself in dreamweaver great code view and then input content and stuff in design view. When you've got to do 100 product tables each with about 20 rows and 7 columns you'll be thanking God that you have design view. I've never used any of dreamweaver's add to head functions or similar before. I just create an external CSS document and then link my pages to it.

Link to comment
Share on other sites

Either way you have to input the data from the products book into the website.
Right, but if you were to have all your products in a database you could use PHP and print the rows in your tables or even the tables themselves using loops, cutting your code down drastically.
Link to comment
Share on other sites

When you've got to do 100 product tables each with about 20 rows and 7 columns you'll be thanking God that you have design view.
Or just thankful that you can use server-side language logic operators do it for you instead.
Link to comment
Share on other sites

If you put it all into a DB (which you would only have to do once per product) you can use conditional statements to output a table for as many products (and the resulting rows and columns) as you need, and the PHP page you make will grow (and shrink) as you enter (or remove) products from the DB. With one conditional statement, you can specify how only one product needs to be outputted to the page and the conditional (probably based on the total number of products) will then output as many rows and columns as are needed.

Link to comment
Share on other sites

The key is that, as thescientist said, you only have to put it in your db once. You can then pull that information out and print it as many times as you needed.For instance, say your products are divided into ten categories and you want to browse the products by category or view all products. Without a db you would manually need to write out all the products for each category and then rewrite the products for the view all page. However, using a db you can pull the products belonging to each of the categories for your individual category pages or pull all records in the db using MySQL and then use loops in PHP to print out all the records in each of your data sets. No manual coding of each product! :)

Link to comment
Share on other sites

I strongly suggest you learn a server-side language and an associated database API. You don't know what you're missing out on. To put it simply, yes, it will write out everything for you.

Link to comment
Share on other sites

I meant just for doing a single table for each product. I was talking about the design view giving me a strong interface for the inputting of the data. I never have needed to do any rewriting.
we know what you meant. We're just trying to offer up to you a better way to do it.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...