Results 1 to 12 of 12

Thread: CSS float

  1. #1

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    CSS float

    Hi,

    I'm floating some images to the left, but a pixel or two line appears. I don't have the CSS to hand atm but I can post later if required.

    I've set all borders and padding and margins to 0.

    I am wondering if its just IE thats the problem...

    Any one come across this before?

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: CSS float

    Originally posted by Ecniv
    Hi,

    but a pixel or two line appears.
    Post snapshot.
    Post CSS if possible as well.

  3. #3

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    I'll post up a piccy and the css file when I get back later

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  4. #4

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Ok.. zip file attached .. with pic and css file...


    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  5. #5
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    You have your border set to 1px. Set it to 0px.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  6. #6

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    If you mean the border on the imgs - this was so I could see where they are. If you set that to 0 too, it is still 1 px away from the edge. I was wondering if it was to do with the float and that for some reason its not liking it.

    Attached is the htm file (change the file type from txt to htm).

    You shouldn't need the imgs, cause it should show you the box where they should be... if you want to try

    Cheers for looking


    Vince
    Attached Files Attached Files

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Hmm... I do see the problem.

    I've noticed that you've done everything through <DIV>s.

    I tried out the padding, setting it to

    VB Code:
    1. margin:0;
    2.     padding:0 0 0 0;
    3.     border:0;

    But no go.

    I would tell you to use Tables instead so you have more control over this, but I doubt you'd do that at such a stage in your work...

  8. #8

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Same problem tho in the tds?
    Or you mean to use a table as the main layout bit which would then be really confusing? Possibly...?

    Code:
    <tr><td><img></td><td rowspan=3> other title stuff</td></tr>
    <tr><td><img></td></tr>
    <tr><td><img></td></tr>
    <tr><td colspan=2>Main disp bit</td></tr>
    If I have to go back to tables, apart from wading through loads of code to try n find stuff, I didn't like the height control in the td (there isn't one in ie, it just stretchs no matter if you specify a height). Divs produce a cleaner (to me) html code, but I suppose if they don't work and tables don't work I'll have to go back to the drawing board.

    Irritating that pixel line

    (sigh)

    Vince

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  9. #9
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Doesn't display the space in firefox.. I haven't looked through your code in detail but it's probably the IE float bug:
    http://positioniseverything.net/expl...reepxtest.html

    good luck!
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  10. #10

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Cheers...

    Good to know

    So it looks like I should just use css to style the content and retreat back to tables to the layout and try not to get too confused where bits n bobs should be (sigh) lovely ms / firefox


    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  11. #11
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986

    So it looks like I should just use css to style the content and retreat back to tables to the layout
    (...)
    Oh please! no tables should not be used for layout purposes, CSS is made for that too. Use tables for tabular data (data sheets etc), and use CSS for the layout. It isn't that hard at all once you get a grip of it. There's only a handful (ahum) bugs to take care of in IE, the rest of the recent browsers have nearly no CSS bugs to take care of.

    So always make sure you initially write your code for firefox (valid (x)html), and then fix the little bugs for IE.

    Oh and be sure to validate your (x)html and css!
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  12. #12

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    errm .. ok ... Could you take a butchers (look) at my other post... please?

    I am fundamentally flawed when it comes to html pages laid out nice on nutscrape/firefox

    http://www.vbforums.com/...=298870


    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width