Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-21-2012, 08:54 AM   PM User | #1
terryds
New to the CF scene

 
Join Date: Dec 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
terryds is an unknown quantity at this point
Question Problem about fixed position

Good afternoon everyone..
I have a problem..
Look at this first :


This is the condition before i changed the topwrap into fixed position

And, look at this :


This is the condition after i changed the topwrap into fixed position

The logo moves to top.. (see the image)
But, I want the logo to stay in the original position (like the one in capture.png)
Can someone help me to make it not move to top ??
terryds is offline   Reply With Quote
Old 12-21-2012, 03:49 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello terryds,
When you make .topwrap fixed, it effectively removes that element from the flow of the document so .header doesn't see it.

The solution is a top margin on .header to push it down enough to clear .topwrap.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 12-21-2012, 08:18 PM   PM User | #3
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,465
Thanks: 0
Thanked 499 Times in 491 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
You will also need to consider whether you want the top wrap content to be in front of or behind the main content of the page when you scroll that content.

The easiest way to make sure it is above the main content is to define it last in the page.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 11:25 AM.


Advertisement
Log in to turn off these ads.