PDA

View Full Version : Whats going on with these layouts!!!


RedBoy
02-10-2006, 10:47 PM
Hi, I am quite a newbie to using dreamweaver exstensivley. I am trying to create a web page using layouts, but it all seems to be going a bit wrong.
My first problem is...

1) I want the layout to be centered relative to screen resolution-I read the tutorial on how to do this using css but I guess I must have made a mistake somewhere because the layout is centered perfectly in IE but not Mozilla Firefox.

2) Second problem is that I have a landscape picture in the layout table, when I place a new layout cell under this picture (or even anywhere else within the current layout table) and fill it with text of some kind, in IE the words dont wrap like they do within dreamweaver and the picture seems to change position. But if I test the same page in Mozilla the formatting is exactly how I wanted it apart from the fact that the whole page should be centered.

Can anyone help, I have included the files for people to look at.

domedia
02-17-2006, 01:51 AM
Did you get this figured out yet, red?

RedBoy
02-17-2006, 11:42 AM
Hi, I have managed to solve the second issue of the above question, and the css centering works in IE, but it still doesn't center in Mozilla. I still don't know if I am simply doing something wrong because nobody has replied to tell me so.
I have tried two ways of incorporating the style into my page-firstly by writing the css style in the head tag of the page and secondly by saving the css as a seperate file and attaching it to the web page as a href link in the head tag.
Also the centering only works in IE when the contents of the page is outside of the DIV wrapper open and closing tags.
Please tell me if I am doing something completly wrong, because I really want to know.

RedBoy
02-17-2006, 01:08 PM
Ok here is some code as an example of my issue...

<!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=iso-8859-1" />
<title>Test</title>
<style type="text/css">
<!--
body {
text-align : center;
min-width : 770px;
margin-top: 0px;
}
div.wrapper {
text-align : left ;
margin-left : auto ;
margin-right : auto ;
}
-->
</style>
</head>

<body>
<div class="wrapper">

<table width="403" border="0" cellpadding="0" cellspacing="0">

<tr>
<td width="700" height="694" valign="top">Current Projects/Redboy Html/Picture Assets/Page Layout 1.jpg</td>
</tr>
</table>
</div>
</body>
</html>
...in the tutorial on using css to center page contents the opening div tag after the opening body tag is <div class="wrapper">.
Any content that you put on your page should be placed between this opening div and it's closing div and therefore should be centered on your page relative to the browser size.
In my case, it doesn't work-the contents isn't centered. So I tried two things-placing the contents outside of these opening and closing divs and leaving my content between the divs but changing the opening div from <div class="wrapper"> to <div id="wrapper">. Both these solutions work, though I am not sure if they are mean't to work like this.

With the above code working well in IE why can't I get this code to center the contents when displayed in Mozilla Firefox??

RedBoy
02-17-2006, 01:11 PM
Ok here is some code as an example of my issue...

<!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=iso-8859-1" />
<title>Test</title>
<style type="text/css">
<!--
body {
text-align : center;
min-width : 770px;
margin-top: 0px;
}
div.wrapper {
text-align : left ;
margin-left : auto ;
margin-right : auto ;
}
-->
</style>
</head>

<body>
<div class="wrapper">

<table width="403" border="0" cellpadding="0" cellspacing="0">

<tr>
<td width="700" height="694" valign="top">Current Projects/Redboy Html/Picture Assets/Page Layout 1.jpg</td>
</tr>
</table>
</div>
</body>
</html>
...in the tutorial on using css to center page contents the opening div tag after the opening body tag is <div class="wrapper">.
Any content that you put on your page should be placed between this opening div and it's closing div and therefore should be centered on your page relative to the browser size.
In my case, it doesn't work-the contents isn't centered. So I tried two things-placing the contents outside of these opening and closing divs and leaving my content between the divs but changing the opening div from <div class="wrapper"> to <div id="wrapper">. Both these solutions work, though I am not sure if they are mean't to work like this.

With the above code working well in IE why can't I get this code to center the contents when displayed in Mozilla Firefox??

domedia
02-17-2006, 01:45 PM
<div class="wrapper">

<table border="0" cellpadding="0" cellspacing="0">
It doesnt seem to center because your wrapper is 700 px wide, but the table was set to 403. If you don't set a width on the table, it will stretch to available width set by it's parent (wrapper)

RedBoy
02-17-2006, 02:33 PM
I have just tried making the changes you've suggested above and it didn't work, the contents were not centered in IE or Mozilla. Could my browser be at fault?
I know that my IE is up to date (v6.2900.2180) and Mozilla is v1.5.0.1.
Do you have an example of the css working so that I could test it in my browsers??

Thanks very much by the way for taking time out to help me, I really appreciate it!! :D

RedBoy
02-17-2006, 03:55 PM
I don't want to speak too soon but I think it is working properly now in both browsers,
will keep you posted.

domedia
02-17-2006, 04:56 PM
Goodie,
cause replies like 'it didn't work' leaves me nothing to work with ;)