SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Feb 2013
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about margin.

    Im creating a responsive grid system and want to see if there is any smoother way to fix my problem.

    All the block elements in my grid has a margin-left: 20px; and Im looking for a way to reset the left margin to zero on the first element in every row.

    Atm im doing this by adding a class called .first which has margin-left: 0 to the first block of every row. But is there a way to do this without adding more classes to the element? To make it simpler for potential users of the grid.

    thanks in advance.

    EDIT: think I got it to work witht the first-child pseudo element.

  2. #2
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it seems you have already fixed your issue


Bookmarks

Posting Permissions

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