Jump to content

css positioning of information in window


Recommended Posts

Hi,

 

I'm facing problems setting up CSS for simple layout:

 

What I have now works ok, when working in full screen, but when I make window smaller, all the content seems to get messed up... can any 1 help fix this

 

div#logo
{
position:absolute;
left:20%;
top: 5%;

}
div#register
{
position:absolute;
left:81%;
top: 2%;
}
div#content
{
position:absolute;
left:20%;
top: 50%;
}
div#trainingpic
{
position:absolute;
left:4%;
top: 2%;	
}
div#info
{
position:absolute;
left:81%;
top: 5%;	
}
div#login
{
position:absolute;
left:82%;
top: 8%;	
}
div#menu
{
position:absolute;
left:2%;
top: 27%;	
}

  that is what i have got for my css layout.....

Link to comment
https://forums.phpfreaks.com/topic/39619-css-positioning-of-information-in-window/
Share on other sites

Okay, well that confirms that it is the absolute positioning you are using.  With a fluid layout you don't want to use absolute positioning, it will prevent things from flowing as the browser is resized.

 

As I look at your code, your site (specifically the header) is not laid out in a logic manor.  Take your header for instance, each element should appear in your code in the order in which you want them to appear in the browser.  Once you have done that you will need to use floats to get them to stack side by side.  More css will be needed to get them the way you want them.  You are using absolute positioning to place them in what appears to be a random order.

Close your body and html tags!

 

</body>

</html>

 

A fairly good beginners css book is

 

"integrated html and CSS"

 

By Virginia DeBolt

 

It will help you with the basics at first.

 

DON'T get into advanced stuff until you have this down.

 

A great tutorials link for beginners to understand general concepts (that I still go back to after all these years) is http://css.maxdesign.com.au/selectutorial/

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.