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.

CSS Forum


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



Reply
i cant get my page to view correctly in browser with my css
Old 09-09-2008, 10:57 AM i cant get my page to view correctly in browser with my css
Webmaster Talker

Posts: 611
Trades: 0
see my last post below

Last edited by silverglade; 09-09-2008 at 03:26 PM..
silverglade is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-09-2008, 11:16 AM Re: i cant get my page to view correctly in browser with my css
thehuskybear's Avatar
Ultra Talker

Posts: 362
Name: Sam
Location: Tucson, AZ
Trades: 1
If you are trying to center your div, there are a few things you will want to do. First, you will want to remove the extra bracket at the end. Second, you will want to set your body tag to have the text align to the center (this is for IE):

HTML Code:
body{
    text-align: center;
}
Give this a try:

HTML Code:
div.wrapper {
width : 770px ;
text-align : left;
margin: 0px auto;
position : relative;
}
__________________

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


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
thehuskybear is offline
Reply With Quote
View Public Profile Visit thehuskybear's homepage!
 
Old 09-09-2008, 11:34 AM Re: i cant get my page to view correctly in browser with my css
Webmaster Talker

Posts: 611
Trades: 0
below

Last edited by silverglade; 09-09-2008 at 03:24 PM..
silverglade is offline
Reply With Quote
View Public Profile
 
Old 09-09-2008, 12:02 PM Re: i cant get my page to view correctly in browser with my css
Webmaster Talker

Posts: 611
Trades: 0
here is new code i tried to get it to line up against the edges of the browser, and theres still space to the right and left. this is new code i got from a website on wrappers. it didnt work. i want to make it look like it does in my 750 pixel width dreamweaver window.
could my problem be that i am set to 1024 x 768 resolution on a widescreen monitor? when i set my resolution to 800x600 it fixes it.

Code:
<!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">
<!--
body {
text-align : center ;
min-width : 770px ;
}
div.wrapper {
width : 770px ;
text-align : left ;
margin-left : auto ;
margin-right : auto ;
position : relative ;
} 
 

</style>
</head>
<body>
<div class="wrapper">  

  <p>gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg</p>
  <p>gggggfffffffff </p>
</div>
</body>
</html>

Last edited by silverglade; 09-09-2008 at 03:26 PM..
silverglade is offline
Reply With Quote
View Public Profile
 
Old 09-09-2008, 04:03 PM Re: i cant get my page to view correctly in browser with my css
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
1 - IE6 does NOT support min/max width/height, but why do you need a width on the body anyway ?

All that code is going to do is make the wrapper fill the entire space of the body - 770.

What you did NOT do is zero out the default margins and padding on the body:
body{margin: 0; padding: 0;}
__________________
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
 
Old 09-09-2008, 04:28 PM Re: i cant get my page to view correctly in browser with my css
Webmaster Talker

Posts: 611
Trades: 0
thank you. i redid my code , i think its what you said. but in dreamweaver view, which is about 750 pixels, there are no spaces to the right and left. but with this code i made, there are large spaces to the right and left of the text in the browser, im trying to get it exactly as it looks in dreamweaver. is there a way i can remove those spaces in the browser? the only way i ever got the dreamweaver view and the browser view to match exactly was to set the width to 1000px. please. derek

here is the code

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
]<!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">
<!--
body {
text-align : center ;
margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
 margin-left: 0px;
 padding-top: 0px;
 padding-right: 0px;
 padding-bottom: 0px;
 padding-left: 0px;
 
}
 
 
 
</style>
</head>
<body>
 
 
  <p>gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg</p>
  <p>gggggfffffffff </p>
 
</body>
</html>

Last edited by silverglade; 09-09-2008 at 04:31 PM..
silverglade is offline
Reply With Quote
View Public Profile
 
Old 09-09-2008, 08:57 PM Re: i cant get my page to view correctly in browser with my css
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
im trying to get it exactly as it looks in dreamweaver.
Don't bother, it's pointless. Depending on the version of DW you have, what you see in DW's preview is NEVER going to look exactly the same in a browser. If you have an older (pre-cs3) version, then it's really bad because DW's internal preview engine was based on IE5.0!

What you're trying to do is just a waste of time. Use the browser preview as you should and you'll save yourself a lot of time and headaches.
__________________
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 i cant get my page to view correctly in browser with my css
 

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.24671 seconds with 12 queries