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 05-07-2012, 05:35 PM   PM User | #1
Xuvel
New to the CF scene

 
Join Date: May 2012
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
Xuvel is an unknown quantity at this point
Countdown tool positioning

Hello, this is actually my first post visit and post on this forum.. here goes!

I've started a website recently and I have some problems with the positioning of one of my new features and I can't seem to get it right without other divs moving..

This is my website ; www.diablo-movies.com

As you see there in a countdown tool that should be in the upper right corner of the content div.. the top should be at the same level as the spotlight div's top..

Thanks for the help!
Xuvel is offline   Reply With Quote
Old 05-07-2012, 06:01 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 Xuvel,
You just need to add some styling to that #topAD, something like this...
Code:
#maincontent {
text-align: left;
}

#top {
height: 28px;
background: transparent url(top_bg.png) repeat-x left top;
}
 #topAD {
width: 300px;
margin: 10px 0 0;
float: left;
} 
	#content {
		background:url(backgroundcontent.png) no-repeat left 105px;
		width: 817px;
Something to pay attention to when working with floats - See the box model here. The box model says that whatever you put inside an element cannot be larger than that element. margin/padding/border all count when figuring width/height.
__________________
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
Users who have thanked Excavator for this post:
Xuvel (05-07-2012)
Old 05-07-2012, 06:41 PM   PM User | #3
Xuvel
New to the CF scene

 
Join Date: May 2012
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
Xuvel is an unknown quantity at this point
I almost had the same code,

I had this

#topAd {
width: 300px;
margin: 12px 0 0 0;
float: left;
overflow: hidden;
}

I changed it to yours but it doesn't seem to change much.. so I'm still stuck :/
Xuvel is offline   Reply With Quote
Old 05-07-2012, 07:42 PM   PM User | #4
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
#topAd

is much different than #topAD

The id you are styling must match the id in your markup or it won't work.
__________________
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
Users who have thanked Excavator for this post:
Xuvel (05-07-2012)
Old 05-07-2012, 08:33 PM   PM User | #5
Xuvel
New to the CF scene

 
Join Date: May 2012
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
Xuvel is an unknown quantity at this point
Thanks a lot!
Xuvel 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 10:06 PM.


Advertisement
Log in to turn off these ads.