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
Trouble Floating Text Over Image
Old 05-29-2009, 04:07 PM Trouble Floating Text Over Image
Average Talker

Posts: 18
Trades: 0
Hi, I'm a bit of a CSS newbie so bear with me please.

I have a header graphic with navigation links. I want to float some more text links over the top right corner of this image. The image uses an image map so I can't use it as background image.

I'm able to place the text where I want in the image, the problem is that it pushes the image down on the page. I want this image to be at the very top of the page and the only way it doesn't move is if I use absolute for the positioning of the text, which I don't want to use.

Code:
<div id="topnav"> 
 <div id="links"> 
 <p><a href="#">Home </a>¦ <a href="#">Blog</a></p> 
 </div> 
 <img src="http://www.example.com/image.jpg" width="757" height="74" /></div>
Code:
#topnav { 
width: 757px; 
margin-top: 0px; 
margin-right: auto; 
margin-bottom: 0px; 
margin-left: auto; 
} 
#links { 
position: relative; 
top: 20px; 
left: 0px; 
width: auto; 
float: right; 
}


I've experimented with everything I can think of but can't seem to get it how I'd really like it.


Thanks for your time.
appage is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-29-2009, 05:53 PM Re: Trouble Floating Text Over Image
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
Anything will push the image down unless you take it out of the normal flow of the document using a float or absolute positioning.
I am not sure what putting all this over an image map will result in however. You don't want to overlap links with the map hotspots, etc.
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 05-29-2009, 08:01 PM Re: Trouble Floating Text Over Image
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Even float isn't going to work in this case, the only way to get it on TOP of what's there is to use position:absolute and a high z-index (like 50). If the container it's going into is set to position:relative, then using absolute for this one thing shouldn't be a big problem.
__________________
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 05-29-2009, 08:22 PM Re: Trouble Floating Text Over Image
World's Avatar
Extreme Talker

Posts: 202
Location: Santa Monica, CA
Trades: 0
And if you placed the image on top of the text in the code and floated it?

Then the text would go around it, and under it, and it would stay on top.
World is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Trouble Floating Text Over Image
 

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 0.24232 seconds with 12 queries