Old 04-21-2008   #1 (permalink)
Registered User
 
Join Date: Apr 2008
Posts: 8

CSS positioning

HELP! I am trying to figure out how to keep my logo which is in a div inside the header div from moving when the browser window is resized. I've been reading about percentages and fixed positions, and maybe just working on it too long ~ not making sense to me!!

Spanish Flowers Mexican Restaurant - About Us

My CSS code:

#logo {
position: absolute;
left: 150px;
top:0
}

and html

<div id="header"><div id="logo"><img src="images/SFlogo2.gif" alt="Spanish Flowers Mexican Restaurant" /></div><div id="animat"><img src="images/topheaderanim.gif" alt="Voted Houston's Best" /></div></div>

Thanks in advance if anyone can help me!
Blue Mermaid
bluemermaid is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-22-2008   #2 (permalink)
photoshop ninja
 
agentxi's Avatar
 
Join Date: Oct 2006
Location: Red Deer - ish, alberta
Posts: 500

you can probably change the absolute to relative then adjust your left/top settings appropriately..
__________________

Your a Graphic Designer...If you could go back in time you wouldn't go back to see the rise and fall of civilizations, you'd go back in time to destroy comic sans and papyrus.
agentxi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-22-2008   #3 (permalink)
Registered User
 
Join Date: Apr 2008
Posts: 8

Sorry, I should have said that I tried that and didn't work. Thanks for taking the time to help.
bluemermaid is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-22-2008   #4 (permalink)
photoshop ninja
 
agentxi's Avatar
 
Join Date: Oct 2006
Location: Red Deer - ish, alberta
Posts: 500

that's wierd, when i did it, used the following

Code:
#logo {
 position: relative;
 left: 15px;
 top:0
}
and when i resized the browser, it always stayed 15px away from the left side of the edge.
__________________

Your a Graphic Designer...If you could go back in time you wouldn't go back to see the rise and fall of civilizations, you'd go back in time to destroy comic sans and papyrus.
agentxi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-23-2008   #5 (permalink)
Be Unique. Be Heard.
 
Jacorre's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 472

If you're absolutely positioning the logo you need something else to be positioned relative. Based on your code it looks like the header should have position equal to relative. Take a look at my tutorial on absolute positioning for more information if needed.
__________________

Jacorre Studios Blog
Jacorre is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-24-2008   #6 (permalink)
Registered User
 
Join Date: Apr 2008
Posts: 8

THANK YOU so much Jacorre!!! That was the missing link. I kept reading about absolute and relative positioning and was almost getting it, but that was the light bulb I needed!!
bluemermaid is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-25-2008   #7 (permalink)
Be Unique. Be Heard.
 
Jacorre's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 472

Quote:
Originally Posted by bluemermaid View Post
THANK YOU so much Jacorre!!! That was the missing link. I kept reading about absolute and relative positioning and was almost getting it, but that was the light bulb I needed!!
Glad I could help! Absolute positioning can be a little confusing at first, but with practice you understand it a lot more over time.
__________________

Jacorre Studios Blog
Jacorre is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
more positioning problems with layers! ?? jbone HTML / PHP / ASP / JS 4 02-12-2008 08:09 PM


All times are GMT +1. The time now is 08:04 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2007 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT