Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Little help for a beginner - fixed width
Old 01-11-2007, 07:07 AM Little help for a beginner - fixed width
Junior Talker

Posts: 2
Name: Jonny
Trades: 0
Hey guys, hopefully someone here will be able to help - it look's like a decent place to ask anyway.

Ok so my problem; this is probably a problem all of you find easy but I'm stumped by it, been searching Google for the last couple of hours trying to figure this out. Ok, I have created a website that looks fine on my monitor but when I go to view it on a widescreen monitor (laptop) the site kind of stretches out to the right, so everything looks stupid.

From searching on Google I have come across something called "fixed width" or something similar? So I was wondering if anyone on here had an answer to my problem, something I can add that will make my site appear the same on whatever monitor (resolution) it's viewed on?

Last edited by TINY; 01-18-2007 at 06:48 AM..
TINY is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-11-2007, 09:36 AM Re: Little help for a beginner - fixed width
bbutton's Avatar
Experienced Talker

Posts: 43
Name: Bill Button
Location: Reading,UK
Trades: 0
Hi,

You could change the body part of your css and adjust the width to make you site look right 850 was just a rough guess.

body {
margin-left: 100px;
margin-right: 100px;
background-image: url();
width: 850px;
}

Kind Regards
Bill Button
http://www.rodmatic.com
bbutton is offline
Reply With Quote
View Public Profile Visit bbutton's homepage!
 
Old 01-11-2007, 11:05 AM Re: Little help for a beginner - fixed width
Junior Talker

Posts: 2
Name: Jonny
Trades: 0
Worked a treat fella. Thanks a lot.
TINY is offline
Reply With Quote
View Public Profile
 
Old 01-11-2007, 01:13 PM Re: Little help for a beginner - fixed width
frofi's Avatar
Extreme Talker

Posts: 236
Location: London
Trades: 0
All I can say is STOP USING TABLES altogether. Since you are mixing them with DIV's, you'd be better off to learn how divs work properly.There is an easy way to center your pages with the proper use of Div's.

Then your central container would look something like this:
Code:
 #central {
position: relative;
background-color:#FFFFFF;
width:795px; /*Should be about 780 or 785 to assure the bottom scroll bar doesn't appear in IE or Opera with 800x600 resolution
height:1018px;
margin:auto;
}
Next, you just put the rest of your div's or even tables (not recommended) inside it. That way your content stays centered whatever the screen size. (providing it is wider than 800px)
And you shouldn't mess about with the body element like that either. To assure browser compatibility, your body should look something like this:
Code:
body, body * {
position: relative;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
background-repeat: no-repeat; /* you can change this to the required state
}
__________________
THE FORCE is with me at last! All I need now is some TALKUPATION ;)

Last edited by frofi; 01-11-2007 at 01:19 PM.. Reason: addition
frofi is offline
Reply With Quote
View Public Profile
 
Old 01-13-2007, 01:38 PM Re: Little help for a beginner - fixed width
Junior Talker

Posts: 3
Trades: 0
When defining a width you can use percentages instead of pixels. Instead of defining it as 850 pixels try defining it as a percentage such as 90%
mrwelter is offline
Reply With Quote
View Public Profile
 
Old 03-08-2007, 02:10 PM Re: Little help for a beginner - fixed width
Novice Talker

Posts: 5
Name: Moses
Trades: 0
Fixed width can also be achieved through pixels
mosesdinakaran is offline
Reply With Quote
View Public Profile
 
Old 03-08-2007, 02:17 PM Re: Little help for a beginner - fixed width
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
You might want to read up on the various types of layouts - fixed vs. fluid - here: http://css-discuss.incutio.com/?page=CssLayouts
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Little help for a beginner - fixed width
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.73368 seconds with 12 queries