Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default margin-top question

    ive got 3 boxes with information containd in them. im watnting to line these boxes up with other information / images on the page.

    this is the basic html

    HTML Code:
    <div id="yellowbox">
    <p>infomation here</p>
    </div>
     
    <div id="yellowbox">
    <p>infomation here</p>
    </div>
     
    <div id="yellowbox">
    <p>infomation here</p>
    </div>
    each box has a top margin of 10px, how ever i would like the first box / div to have a top margin of 20px so it lines up with other elements on my page. can this be done.

    i know you can do it with odds and even but can the first child be done alone???

  2. #2
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: margin-top question

    Quote Originally Posted by kitcorsa View Post
    ive got 3 boxes with information containd in them. im watnting to line these boxes up with other information / images on the page.

    this is the basic html

    HTML Code:
    <div id="yellowbox">
    <p>infomation here</p>
    </div>
     
    <div id="yellowbox">
    <p>infomation here</p>
    </div>
     
    <div id="yellowbox">
    <p>infomation here</p>
    </div>
    each box has a top margin of 10px, how ever i would like the first box / div to have a top margin of 20px so it lines up with other elements on my page. can this be done.

    i know you can do it with odds and even but can the first child be done alone???
    Can you change the id of the first box? To maybe yellowboxfirst? then it can get its own css.

  3. #3
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: margin-top question

    yeah thats what ive done at the moment but it just makes the css more complex. as you can imagen im not the only person using the site so i have to try to makethings as easy as possible. so other people changing the infor only have to give the correct dive or a yellow box red box green box etc not the first second first etc etc etc

 

 

Similar Threads

  1. margin-top not working in IE
    By dpecsok in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Sep 2008, 05:59 PM
  2. Top Margin?
    By mommydesigns in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Feb 2007, 01:42 AM

Posting Permissions

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