Jump to content

span won't float right


Imaulle

Recommended Posts

Hello,

 

I'm messing around with jQuery UI 'sortable' and I'm not able to get a specific span to float right

 

Here is my code so far

 

<style>
#SlideshowOne { list-style-type: none; margin: 0; padding: 0; width: 80%; }
#SlideshowOne li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; }
#SlideshowOne li span { position: absolute; margin-left: -1.3em; }
#SlideshowOne span ui-icon-closethick { float:right; margin-right:3px; }
</style>

...

<ul id="SlideshowOne"> 
  <li class="ui-state-default">
    <span class="ui-icon ui-icon-arrowthick-2-n-s"></span><a href="#"><span class="ui-icon ui-icon-closethick"></span></a>
</li>

 

 

The span ui-icon ui-icon-arrowthick-2-n-s needs to float left, but I need the ui-icon ui-icon-closethick to float right as it's a 'delete' button...

 

 

any ideas? Also, what class IDs etc can I remove? for example I"m not sure if class="ui-state-default" is needed?

Link to comment
Share on other sites

 

The span ui-icon ui-icon-arrowthick-2-n-s needs to float left, but I need the ui-icon ui-icon-closethick to float right as it's a 'delete' button...

 

 

i don't see the float: left; for this?

Link to comment
Share on other sites

hmmm nevermind I guess neither of them are 'floating' left. but both of them are on the far left and they are ontop of eachother. I just need <span class="ui-icon ui-icon-closethick"></span> to show up on the far right side of the li

Link to comment
Share on other sites

i think the float isn't being recognized because the parent element is positioned absolute.

 

nvm not even that its that the elements your floating are positioned absolute...

 

#SlideshowOne li span { position: absolute; margin-left: -1.3em; }

Link to comment
Share on other sites

looks a little better! before they were ontop of eachother...

 

whd2xc.jpg

 

 

how can I differentiate between the two different spans?

 

I've tried this, but it does not work...

 

#SlideshowOne span ui-icon-closethick { float: right; }

Link to comment
Share on other sites

give them different ID's?

 

er uh..

 

#SlideshowOne span.ui-icon-closethick {float:right;}

 

cept the class name has space in it.. ui-icon ui-icon-arrowthick-2-n-s not sure if that canwork or not

 

 

i guess i would try #SlideshowOne span.ui-icon ui-icon-closethick {float:right;}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.