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
Old 11-19-2007, 03:43 PM Span Issues
Novice Talker

Posts: 5
Name: Scott Baldridge
Location: Nashville, TN
Trades: 0
Hello, I'm having some trouble getting a span to work. I want the hypContact to be on the same row or line if you will that the imgPageTitle is on. Currently the span is floating the hypContact to the right but on a new line. How can I achieve my desired results given the markup and CSS below?
FYI: the ImageURL is set programatically based on a selected theme.


Markup:
<div id="pagetitle">
<asp:Image ID="imgPageTitle" ImageUrl="" AlternateText="HR Home Page Title" runat="server" />
<span id="spanright">
<asp:HyperLink ID="hypContact" ImageUrl="" NavigateUrl="~/HR/Contact.aspx" ToolTip="Contact HR" runat="server">Contact HR</asp:HyperLink></span>
</div>


CSS
#pagetitle
{
padding: 5px 5px 0px 0px;
width: 760px}

#spanright {float:right;}
GoGetSome is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-19-2007, 06:55 PM Re: Span Issues
Novice Talker

Posts: 5
Name: Scott Baldridge
Location: Nashville, TN
Trades: 0
Ok, so I solved this by adding a span to the object I wanted to align left and I added a width and height to the div. Here are the changes:

Markup:
<divid="pagetitle">
<spanid="spanpagetitleleft"><asp:ImageID="imgPageTitle"ImageUrl=""AlternateText="HR Home Page Title"runat="server"/>
</span><spanid="spanright">
<asp:HyperLinkID="hypContact"ImageUrl=""NavigateUrl="~/HR/Contact.aspx"ToolTip="Contact HR"runat="server">Contact HR</asp:HyperLink></span>
</div>

CSS:

#pagetitle
{
padding: 5px5px5px0px;
width: 760px;
height: 25px;
}
GoGetSome is offline
Reply With Quote
View Public Profile
 
Old 11-20-2007, 11:17 AM Re: Span Issues
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Hiya Scott !! I see you found us and dove in

Any time you float an element, you MUST define a width. The only time you don't have to do that is when floating an image, since the width is set in your html.
__________________
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
 
Reply     « Reply to Span Issues
 

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