Jump to content

percentage widths problem!!


adamhhh

Recommended Posts

right this has been bugging me for a few days now,

 

ive played around with a lot of sites and when you resize the browser (assuming their using % widths rather than absolute) the divs get smaller but dont go down the page etc as my page is doing..

 

http://www.studybot.net/studentsite/index2.php

 

here this is a header div with 2 divs inside. When i reduce the browser window eventually the logo2 div goes outside the header div rathern than scrunching up, as i want it to??

 

the html..

<code>

<div id="header">

  <div id="logo"><img src="images/studybot_logo.jpg" alt="Study Bot logo" width="171" height="30" /></div>

  <div id="logo2">Content for id "logo2" Goes </div>

</div></code>

 

the css..

 

<code>#header {

width: 100%;

background-color: #E8E8E8;

padding-left: 28px;

padding-top: 20px;

float: left;

margin-top: -20px;

margin-bottom: -20px;

margin-left: -20px;

height: 40px;

}

#logo {

float: left;

margin-bottom: 10px;

}

 

#logo2 {

height: auto;

width: auto;

float: left;

margin-top: 12px;

margin-left: 60px;

}

</code>

 

any ideas??

 

 

Link to comment
Share on other sites

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.