Viewing 1 replies (of 1 total)
  • So the buttons right now each take up half the width of the area they are in, and what you want to do is add another button, on the same line? So that they then each take up only a third of the area?

    If that’s the case you’ll first need to look at your stylesheet and find the styles for “half” “first” and “last”

    Most likely “half” specifies a width property with maybe some margins and padding, and “first” and “last” likely have floats in them.

    FIRST BACKUP BOTH THE STYLESHEET AND THE PAGE WITH THE CODE!

    Then I would change “half” to “third” and modify the width so that each button with the class of half takes up one third of the space, minus any margins you use – width plus margins cannot equal more that 100% of the space or it won’t line up right.

    You’ll change “half” to “third” in both the stylesheet and the page so they match.

    Now for ‘first’ and ‘last’…and how they are floated.

    If they are both float:left; no problem, just add ‘second’ to the stylesheet with the same float:left and then put that style in your new button so it reads style=”second third”

    Where it will get tricky is if “first” is a float:left; and “last” is a float:right;

    You can change them so they are all float:left; which will work, alhtough you may have to adjust the margins a bit on the ‘third’ style to keep them where you want them.

Viewing 1 replies (of 1 total)
  • The topic ‘Class Div’ is closed to new replies.