The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Absolute positioning works TOO well. :[
Cake
post Dec 9 2008, 10:38 PM
Post #1





Group: Members
Posts: 7
Joined: 9-December 08
Member No.: 7,298



Here's a link to my page: http://cake.web44.net/

When the page is maximized, everything is perfect. The problem is that when the window is smaller than usual, the iframe jumps to the right from the absolute positioning. To view the code, just use "View Source" please.

Thanks so much with any and all help I may receive. :]

Whoops, I posted this in the wrong place. :[ Well, since I'm here, I might as well ask if there's a better thing to use than an iframe.


This post has been edited by Cake: Dec 9 2008, 10:42 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 9 2008, 11:59 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



That's what happens when you position things relative the edges of the browser window. Why not just center the iframe?

QUOTE

Whoops, I posted this in the wrong place. :[ Well, since I'm here, I might as well ask if there's a better thing to use than an iframe. [/size][/font][/color]


Yeah, there is. Question is why do you use the iframe now? What is it you want to accomplish? Is it the scrollbar you like? Do you want to avoid updating the whole page? Or...?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Dec 10 2008, 12:02 AM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Your background image is centered. Your content is positioned relative to the left edge of the display area. They're going to match at only one width of browser window. Pick one approach and use it for both.

But positioning content over specific areas of a background image is a particularly fragile way to design a layout. It's better to give each element its own background, in a way that allows the background to adjust to the size of the element.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Cake
post Dec 10 2008, 02:42 AM
Post #4





Group: Members
Posts: 7
Joined: 9-December 08
Member No.: 7,298



Pandy:
Yeah, I don't want to have to update the entire page. I'm not too great at PHP or else I'd do that. :[

Darin:
Should I use a table? I'm not sure what I should do from here.


Thanks for your advice so far, guys. :]
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 10 2008, 06:18 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



You could use PHP, you don't need to be great to do this. Or use SSI if you don't think you need PHP for anything else.

More here: http://htmlhelp.com/faq/html/design.html#include-file .

It's as easy as this. Cut out the code for example the menu (what you want to include on all pages) and save it in a separate file. You can save it as .txt. I like .inc because I immediately know what it is.


In the HTML file you put this where the menu used to be.
<!--#include virtual="/path/to/menu.inc" -->

That's basically it. Not too hard, huh? happy.gif

You also need to tell the server to parse the document for SSI. Easiest is to rename the HTML file to .shtml. You can change that so .html files are also parsed, but to just try it out .shtml will do fine until you know if you want to continue to use it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Cake
post Dec 10 2008, 08:18 PM
Post #6





Group: Members
Posts: 7
Joined: 9-December 08
Member No.: 7,298



Okay, awesome! Thanks. I'll definitely try that.

However, I'm not sure what I should do about the absolute positioning. How would I be able to keep the layout?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 12 2008, 07:26 PM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Center the iframe.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 10:13 AM