Current location: Hot Scripts Forums » General Web Coding » CSS » div and css problem

div and css problem

Reply
  #1 (permalink)  
Old 09-02-06, 11:31 PM
nicpon nicpon is offline
Wannabe Coder
 
Join Date: Apr 2004
Location: Moving
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
div and css problem

I have a div tag with css id that has this configuration
Code:
#navigation {
	background: #02A5FF url("title.png") repeat-x;
	border-top-style:solid;
	border-top-width:thin;
	border-top-color:#000000;
	border-bottom-style:solid;
	border-bottom-width:thin;
	border-bottom-color:#000000;
	margin: 0px;
	padding-bottom: 3px;
	padding-top: 3px;
	text-align: left;
	width:700px;
	color:#FFFFFF;
}
Then I have this html code
Code:
<div id="navigation">
		<a href="link1" class="menu">link1</a> -
		<a href="link2" class="menu">link2</a> -
		<a href="link3" class="menu">link3</a>
		text:text
	</div>
How can I get text:text aligned to the right with rest of the stuff to left in the same line. I've tried many combinations and either text:text goes to next line or its aligned with all links to the left.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 09-03-06, 12:45 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
This may or may not do what you want. Create this in your styles -
Code:
.rightside {float:right;}
and do this -
Code:
<div id="navigation">
		<span class="rightside">text:text</span>
		<a href="link1" class="menu">link1</a> -
		<a href="link2" class="menu">link2</a> -
		<a href="link3" class="menu">link3</a>
	</div>
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 09-03-06, 02:30 PM
nicpon nicpon is offline
Wannabe Coder
 
Join Date: Apr 2004
Location: Moving
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
It does work half way. I say half way because tex:text is aligned to the right but is not in line with the rest of the links. Check it out here http://toplista.swim.pl/ I'm talking about the three links under header (Ranking - Dołącz - Panel kontrolny użytkownika) and then text:text( Użytkownicy: 1)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 09-03-06, 02:46 PM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Put the span before the links, exactly the way I posted -
Code:
<span class="rightside">text:text</span>
<a href="link1" class="menu">link1</a> -
...
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 09-03-06, 07:24 PM
nicpon nicpon is offline
Wannabe Coder
 
Join Date: Apr 2004
Location: Moving
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
You got it man. Can you tell me why it makes a difference?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 09-03-06, 09:38 PM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by nicpon
You got it man. Can you tell me why it makes a difference?
No I don't know. A span should only change the contents within the span tags. It is almost like the span got treated like a div and ended up with newline before it.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Just getting into CSS. and I love it mcrob CSS 3 07-29-06 08:48 PM
css autoheight issue Rollo Tamasi CSS 2 07-04-06 11:11 PM
CSS Div problem themanmathias CSS 1 09-29-05 08:05 PM
CSS Div + Span help Arctic CSS 5 07-20-05 04:27 PM
CSS Layout problem Torbinsky CSS 2 06-10-05 10:50 AM


All times are GMT -5. The time now is 11:40 PM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.