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
question about floating
Old 11-25-2009, 11:24 PM question about floating
Ultra Talker

Posts: 254
Trades: 0
i have a simple question, for example i have a link at the left edge of a div and link at the right edge of a div, a typical example would be at the footer.

what i normally do is take 2 divs and float them and set text-align: right for the 2nd div

#left{
float: left;
width: 500px;
height: 10px;
}

#right{
float: left;
width: 400px;
height: 10px;
text-align: right;
}

now in the left and right div i add the links 1 in left and 1 in right, all this works fine

however because its a small thing i was wondering if there is a much more simple way to do this instead of taking 2 divs and floating them and for the next content clearing needs to be used.


1.
i guess i can use 2 p tags however i have to set them to display: inline which might not be ideal i guess

2.
take 2 a tags and give them separate class names and set one class to float: left and the other to float: right



is there a much better and efficient way to achieve this effect apart from the 2 methods i mentioned above and using 2 divs and floating them.

thanks.
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-26-2009, 12:26 AM Re: question about floating
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
Your second idea can have a css rule for left and right to apply to unlimited situations:

css:
.alignleft { float:left }
.alignright { float:right }
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 11-26-2009, 12:43 AM Re: question about floating
Ultra Talker

Posts: 254
Trades: 0
thanks for letting me know.
sudhakararaog is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to question about floating
 

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