Announcement

Collapse
No announcement yet.

CSS query:

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CSS query:

    If you have a 'div' and want to place 4 links in it as if they were in cells (for exmple like in excel: 2 on top and 2 on bottom row). How can you achieve this??

    #2
    There is about 10 ways to do it, i would do something like this to keep it easy:

    <div id="linksContainer">
    <a href="blah.htm">Blah</a>
    <a href="blah.htm">Blah</a>
    <a href="blah.htm">Blah</a>
    <a href="blah.htm">Blah</a>
    </div>

    and have the following in your stylesheet

    #linksContainer a {
    float: left;
    display: block;
    width: 50%;
    }

    Don't use an ID if not unique area on the page, you should use a class in that case instead.

    Comment


      #3
      You may need to specifically declare the width of the #linksContainer as well to ensure it fits with your design.


      Bikster
      SellerDeck Designs and Responsive Themes

      Comment


        #4
        Thanks for that. Very helpful!!

        Comment

        Working...
        X