Grow your CSS skills. Land your dream job.

For Some Reason Float Image Not Working??

  • # April 30, 2013 at 11:43 am

    I am having trouble learning how to float images to the left and text to the right.

    For some reason not working now. have tried display block and in-line block plus floats

    http://codepen.io/mwbcomputers/pen/sFqmD

    Trying to get basket image to float left total next to it and cart under total.

    I am just teaching my self how not sure probably something simple I missed

    # April 30, 2013 at 11:46 am

    Dude….how many times do I have to tell you?

    **YOU CAN’T USE AN LI WITHOUT A UL AROUND IT**

    A list item is not a div…they aren’t interchangeable.

    # April 30, 2013 at 11:47 am

    You’re having some listitems (LI’s) that are not wrapped in a UL.

    LI’s should ALWAYS be nested in a UL or OL.

    http://codepen.io/senff/pen/BbviL

    > YOU CAN’T USE AN LI WITHOUT A UL AROUND IT

    Yes you can. OL work too. :)

    # April 30, 2013 at 11:49 am

    Just stripping out the li tags that you shouldn’t be using (especially because they aren’t list items) gets you half way there: http://codepen.io/Paulie-D/pen/kftrB

    # April 30, 2013 at 11:50 am

    >Yes you can. OL work too. :)

    OK…strike CAN’T for SHOULDN’T

    Although I’d be interested in seeing a `ol li` working properly without an ` ol` wrapper. :)

    # April 30, 2013 at 11:53 am

    I would rephrase to: YOU CAN’T USE AN LI WITHOUT A UL OR AN OL AROUND IT

    @mwbcomputers, take note of that.

    # April 30, 2013 at 12:14 pm

    Thanks All Will take note an keep trying its one of the things all ways tend to have trouble with

    # April 30, 2013 at 1:59 pm

    found this ul.menuinfo li:nth-child(8) think use this kinda thing now

    # April 30, 2013 at 2:25 pm

    Yep. That makes total sense.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".