Tech Support banner

Status
Not open for further replies.
1 - 4 of 4 Posts

·
TSF Team Emeritus, Design Team
Joined
·
2,274 Posts
Discussion Starter #1
Hi all, I'm having quite a brain fart here, and would love some help. All I need to do is create a css style (or ID, whatever you want to call it) in dreamweaver that will make a div lets say 800 pixels wide that is centered in the screen (and will create scrollbars when the screen is narrower than 800 pixels). If theres anything that I can clarify, let me know.
Sorry for such a dumb question... its been a rough day.
Thanks!
-six
 

·
TSF Team Emeritus
Joined
·
337 Posts
Hi six,

I don't use dreamweaver, but the raw code goes something like this..

#test {width: auto; min-width:800px}

then

<div id="test">
</div>

that will sort out width and scrolling. AFAIK, you can't just align a div centrally. You can cheat though, by using static invisible divs either side. I'm just off to work now, but have a look at the behaviour of the central div on one of my sites..

www.hanworthclub.co.uk

at different screen sizes and res's. It's centralised by the outer divs and the width adjusts automatically. It's not ideal, but you will get the desired effect. Have a play around with something like that, and I'll be back later.

Cheers

Liam
 

·
TSF Team Emeritus, Design Team
Joined
·
2,274 Posts
Discussion Starter #3
Thanks Liam, I'm on the right track now. What I'm looking for is something like this,
www.newpaltz.edu
where the layout elements are always positioned in the center. I couldn't even find what part of their code accomplished this... argh
:jail:
 

·
TSF Team Emeritus, Design Team
Joined
·
2,274 Posts
Discussion Starter #4
... post # 500

I figured out the cause of my brain fart.
I was trying to figure out why
body{
margin:0;
padding:0;
text-align:center;
}
wouldnt work in my html file. Because it doesn't.. it goes in the .css file.
A mind is a terrible thing to waste.
 
1 - 4 of 4 Posts
Status
Not open for further replies.
Top