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
Last one,,,, for today
Old 03-24-2009, 07:13 PM Last one,,,, for today
Experienced Talker

Posts: 39
Name: Scott Bronson
Trades: 0
I inserted an image in my CSS code its a big box, in my HTML code I wraped in a DIV tag, is there any way to position text in that box, by default it goes on the bottom, I want to put it in the upper part of it.
sbronson is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-24-2009, 07:28 PM Re: Last one,,,, for today
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
elements including text will appear in the order they are in the source unless you position them differently.

if you want to overlay text on an image, you would set the image as a background.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-24-2009, 07:31 PM Re: Last one,,,, for today
Experienced Talker

Posts: 39
Name: Scott Bronson
Trades: 0
I did that. There is also a placeholder image inside the div tag, I want the text to be in the upper right side of that image. Can that be done?
sbronson is offline
Reply With Quote
View Public Profile
 
Old 03-24-2009, 07:35 PM Re: Last one,,,, for today
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
placeholder image? explain what you mean

better still, some code and maybe an image of what you WANT to achieve
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-24-2009, 07:42 PM Re: Last one,,,, for today
Experienced Talker

Posts: 39
Name: Scott Bronson
Trades: 0
HTML:
<div id="background_image">

<center><img src="placeholder_box.gif" /></center>


</div>

CSS:
#background_image{ background-image:url(hosteagle_background2.jpg)}


I would like to put text to the upper right of the placeholder_box with in the background
sbronson is offline
Reply With Quote
View Public Profile
 
Old 03-24-2009, 07:56 PM Re: Last one,,,, for today
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
get rid of the deprecated <center> tags for a start.

HTML Code:
<div id="background_image">
<span>Some text</span>
<img src="placeholder_box.gif" />
</div>
Code:
#background_image { 
   background-image:url(hosteagle_background2.jpg)
}
#background_image span {
    float:right;
}
#background_image img {
   display:block;
   margin:0 auto;
}
looks about right, assuming I have interpreted your idea correctly
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-25-2009, 10:53 AM Re: Last one,,,, for today
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Question - why would you use a <span> in there when you could apply that css to a heading Hx tag or even a <p> in there ??
__________________
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 03-25-2009, 04:24 PM Re: Last one,,,, for today
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Question - why would you use a <span> in there when you could apply that css to a heading Hx tag or even a <p> in there ??
No particular reason at all

As you say any container would do. Which container element would primarily depend on the use the text was being put to of course.
And it doesn't really need an extra element if it is just for text, applying text-align:right on the parent element would have the same effect.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Last one,,,, for today
 

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