Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trouble with css layout

Status
Not open for further replies.

eddiedesign

Programmer
Jul 3, 2006
9
GB
Hi there,

I'm using CSS for the very first time to build my web page.
I am having trouble with the div id called "text", the trouble is, that the text moves depending on the screen resolution you are on, and would like it to have its set place on the web page if possible.

If anyone could help, that would be very much apprecited.

Here are the pages

(html page)

(the style sheet)

Eddie
 
Hi there,

Really apprecite your reply. If i describe the page layout please, at the top is the header (yellow) , then the main column (white) then then footer (light grey) i would really like the text to be place within footer part, centered in the footer if possible, hope this makes sense.

Thanks again

Eddie
 
I have code this code for that div

#text{
background-color:#f3f3f2;
width:652px;
position:absolute;
top: 510px;
left: 310px;
z-index: 1;
}

Do you mind giving me a hand on what i should defintely have?

Thanks

Eddie
 
I had a look into the css tutorials and still cant make sense of this, i'm not sure if its the code in the html document, or if its the actual style sheet.

If you could help out any further, that would be very much apprecited.

Eddie
 
If you want the div with id=text in the footer put it there i.e.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "<html>
<head>
<title></title>
<meta name="description" content=" ">
<meta name="keywords" content=" ">
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />

<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body bgcolor="ebeae8">
<div id="pagewidth" >
<div id="header" >
<img src="images/topcss.jpg" width="785" height="181">
</div>
<div id="wrapper" class="clearfix" >
<div id="maincol" >
<img src="images/middel1css.jpg" width="785" height="292">
</div>
</div>
<div id="footer" >
<div id="text" >
<h1>test test test test test test test test test</h1>
<p>test test test test test test test test test test<br>
<br>
test test test test test test</p>
<img src="images/contactteam.jpg"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="images/view.jpg">
</div>
</div>
</div>
</body>
</html>

then change your stylesheet

#text{
background-color:#f3f3f2;
width:652px;
position:relative;
z-index: 1;
}

#footer{
position:relative;
left: 10px;
height:268px;
width:762px;
background-color:#f3f3f2;
clear:both;
text-align:center;
}

I have removed "top=" and "left=" from the style of #text and added "text-align:center" to #footer

Hope this is where you wanted it.
 
Hi there,

this is fantastic, but only a minor change to it please, in the html code, i would really like the div id="text" to be placed at the top of the code, but still having it placed where it is with new code, can this be done?

apprecite your help

Eddie
 
Hi there,

Just wanted to see if this was possible, if you can help anymore on this, it would be very much apprecited.

Thanks

Eddie
 
would really like that code for the div id="text" to be placed at the top of the code.

Thanks

Eddie
 
Actually the best help on this is to tell you not to bother. There is only one reason anyone would want to do this and it simply isn't worth the effort or time needed to change any layout.


There are several disadvantages to it and the main issue of compromising accessibility should also be considered.




Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
Yes it is, but it is a real pain and any minor change to the content may cause real problems. Why do you want to do this? there may be an easier work round.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top