Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Problem with sticking div to top
Old 06-22-2010, 08:11 AM Problem with sticking div to top
Novice Talker

Posts: 10
Name: Heam
Trades: 0
Hey Guys.

This is my url : http://www.hamidoffice.com/kar/mrmr and i am trying to stick red part to top like this photo :
http://www.hamidoffice.com/kar/forum/HEADER.jpg

please tell me ow can i to that
aghahamidgol is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-22-2010, 08:14 AM Re: Problem with sticking div to top
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Your logo (h1) is pushing the bar down.
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-22-2010, 08:15 AM Re: Problem with sticking div to top
Novice Talker

Posts: 10
Name: Heam
Trades: 0
Quote:
Originally Posted by Phunk Rabbit View Post
Your logo (h1) is pushing the bar down.
thanks a lot it works but how can i put my logo on this postion without any problem ? My logo should be there
aghahamidgol is offline
Reply With Quote
View Public Profile
 
Old 06-22-2010, 08:16 AM Re: Problem with sticking div to top
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Absolute possitioning, you will need to have the logo hovering over the header and the bar.
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-22-2010, 08:23 AM Re: Problem with sticking div to top
Novice Talker

Posts: 10
Name: Heam
Trades: 0
thanks again but now if you look at my page the logo jump behind the div
http://www.hamidoffice.com/kar/mrmr/
everything is fine except logo in header part
aghahamidgol is offline
Reply With Quote
View Public Profile
 
Old 06-22-2010, 08:28 AM Re: Problem with sticking div to top
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Give the <h1> a z-index of 10
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-22-2010, 08:45 AM Re: Problem with sticking div to top
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
First of all, before you do anything else, you need to put a proper DOCTYPE on your page. You'll have all sorts of trouble, especially with IE, w/o a proper DTD on your pages.

Your #header is set to a height of 69px, yet the h1 you're putting inside it is set to a height of 145px, that doesn't work well. You also need to CLEAR your floats, putting overflow:auto on #header will do that.

Based on what I see in your code, I don't see any reason to use position:absolute at all.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-22-2010, 08:47 AM Re: Problem with sticking div to top
Novice Talker

Posts: 10
Name: Heam
Trades: 0
thanks a lot LadynRed , I change the code now for easy solution, just could you tell me whats that blue space on my site and how can i remove it and replace it with my header? http://www.hamidoffice.com/kar/mrmr/
Quote:
#header{
background: #102b48 url(images/header.jpg) no-repeat;
height:109px;
margin;
}
aghahamidgol is offline
Reply With Quote
View Public Profile
 
Old 06-22-2010, 08:49 AM Re: Problem with sticking div to top
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Blue? I don't see any blue
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-22-2010, 08:54 AM Re: Problem with sticking div to top
Novice Talker

Posts: 10
Name: Heam
Trades: 0
on my laptop i see this picture on top right
But on my PC everything is ok
aghahamidgol is offline
Reply With Quote
View Public Profile
 
Old 06-22-2010, 01:56 PM Re: Problem with sticking div to top
Super Talker

Posts: 144
Name: Nick Mallare
Location: Olathe, KS
Trades: 0
It is probably browser-related. I test it in Win/Chrome, Win/FF3.6, Win/IE7 and Win/IE8 and see no issues.

Nick
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
nmallare is offline
Reply With Quote
View Public Profile Visit nmallare's homepage!
 
Old 06-22-2010, 03:24 PM Re: Problem with sticking div to top
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
I tend to agree, I don't see that color anywhere in the code.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-22-2010, 03:25 PM Re: Problem with sticking div to top
Super Talker

Posts: 144
Name: Nick Mallare
Location: Olathe, KS
Trades: 0
Well, I do see the color, just not the bug.

Nick
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by nmallare; 06-22-2010 at 03:32 PM..
nmallare is offline
Reply With Quote
View Public Profile Visit nmallare's homepage!
 
Old 06-22-2010, 03:33 PM Re: Problem with sticking div to top
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
What browser?
What OS?
What screen resolution/dimensions?
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-23-2010, 03:31 AM Re: Problem with sticking div to top
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
The blue is coming from here:

Code:
#header {
background:url("images/header.jpg") no-repeat scroll 0 0 #102B48;
height:109px;
margin:auto;
}
You need to repeat the background on the x axis and id maybe change the colour to a dark grey so it matches better if the image disapears:

Code:
#header {
background:url("images/header.jpg") repeat-x scroll 0 0 #222;
height:109px;
margin:auto;
}
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Reply     « Reply to Problem with sticking div to top
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.54807 seconds with 12 queries