Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Confused about float behaviour

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #40686
    pencil
    Member

    Hello guys, I want to make a horizontal scroll page. I am using the following code when the divs have width:49% they are placed side by side, but when it is made 50% they are placed vertically. The second div is floated left. Why is it going down when there is space left in the parent (body)

    http://jsfiddle.net/ZxWEu/

    #113667
    pencil
    Member

    Also, please throw some light about the process of designing a web page

    #113672
    Paulie_D
    Member

    @ Pencil _”Also, please throw some light about the process of designing a web page”._

    Seriously?

    #113673
    JoniGiuro
    Participant

    remember that using border will increase the width of the element.
    For example, if you have this css rule:
    div{
    width:200px;
    border:10px solid #000;
    }

    the total width will be 200+10+10 = 220px.

    The same thing happens if you use percentage widths.
    50% width + border = more than 50%

    #113674
    Paulie_D
    Member

    As for your width issues…are you using a reset / normalise?

    Browsers have built in padding & margins which will futz this up for you.

    #113755
    pencil
    Member

    @paulie_D I have to make a login page and I am confused where to start, how to design it, choosing colors etc and thanks for that new piece of information normalise, I only knew reset.


    @joniGiuro
    Thanks for the information:D

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.