PDA

View Full Version : Designing question..


gigiloumill
07-28-2009, 07:16 PM
Guys, when designing a site in pure css, what would be better, putting all content inside a main div or can I put the top banner and the footer out side? Thanks

Ricky55
07-28-2009, 07:42 PM
Depends on what you want to achieve really but generally you will have a container div which wraps around all the other divs.

Don't create Divs unnecessarily though, for instance don;t create a div and then insert a <ul> unordered list, just style the list instead.

Try to keep your code clean and as efficient as possible.

DWcourse
07-28-2009, 07:53 PM
There are multiple ways to accomplish any design using css. Just try to be efficient like R55 suggests.

gigiloumill
07-28-2009, 08:02 PM
Interesting. I am trying to design a page with the banner and footer outside the main container, but when I scroll from up and down the divs seem to disappear. They're still there but it's very annoying when the disappear. Do you know why it does this? Thanks.

Ricky55
07-29-2009, 10:47 AM
Its probably due to the way in which you have positioned you divs, perhaps with absolutely.

Why do you want them outside of the container? are they stretching to fill the screen horizontally?

I did this site a while back
http://www.spenvalleykitchens.co.uk/

This works like you mention. The header section is outside of the main container so it fills the screen.

gigiloumill
07-29-2009, 12:22 PM
That's exactly what I'm trying to do.

gigiloumill
07-29-2009, 02:37 PM
I have tried every position, even leaving blank and I still can't figure out why they keep disappearing while scrolling up and down. has anyone experience this?

Ricky55
07-29-2009, 03:10 PM
Send me your file and I'll have a look for you.

I'll post the code back on here so it helps others.

richard@qwerty-design.co.uk

domedia
07-29-2009, 03:29 PM
Or why not just post the code here like everyone else (or even better: provide a link) and let the community help you out ;)

gigiloumill
07-29-2009, 03:36 PM
Here's one I just did to show you. It's really annoying. I can't see where in the div I am in.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.top_banner {
height: 1in;
width: 8in;
margin-right: auto;
margin-left: auto;
border: thin dotted #CCC;
}
.main_content {
height: 8in;
width: 8in;
margin-right: auto;
margin-left: auto;
border: thin dotted #CCC;
}
.footer {
height: 2in;
width: 8in;
border: thin dotted #CCC;
}
-->
</style>
</head>

<body>
<div class="top_banner">
<p>Content for class "top_banner" Goes Here</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="main_content">
<p>Content for class "main_content" Goes Here</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div class="footer">Content for class "footer" Goes Here</div>
<p>&nbsp;</p>
</div>
</body>
</html>

gigiloumill
07-29-2009, 03:57 PM
O.K. If I use a template it works fine. I am trying to make up my own template. Can you save a temp as a temp? thanks

d a v e
07-29-2009, 04:46 PM
er, what? what's as temp? a template or a temporary file or... ? look at templates in DW help (F1 on your keyboard)

Jittor
07-29-2009, 05:10 PM
lol, I'm sorry but that's so confusing it's funny. I think I understand though. Are you asking if you can take a template, change it up and then resave it as another template?

Jittor
07-29-2009, 05:22 PM
I looked at your code in Dreamweaver and I see what your saying. It is kind of annoying, but I'm not sure it's a coding issue as it previews just fine. Even when I add a background color it gets cut of. But if I flip to another program and then back it reappears? Strange

gigiloumill
07-29-2009, 07:01 PM
I don't know what to do with it.

Ricky55
07-29-2009, 07:40 PM
Or why not just post the code here like everyone else (or even better: provide a link) and let the community help you out ;)

I'll post the code back on here so it helps others.

Is that not the same thing?

d a v e
07-29-2009, 08:41 PM
I don't know what to do with it.

that makes at least 2 of us :)

domedia
07-30-2009, 02:18 PM
I'll post the code back on here so it helps others.

Is that not the same thing?

I'm sure other people have some ideas and input as well. Might even be different than what yo have. So no, not entirely the same 8)