Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS newbie Please help

    Hello All,

    I have looked through a lot of forums, and I must say that this one i probably the only one that actually helps exactly with what the problem is. I thank you in advance for the help.
    I am very new to css and I don't understand the rules that need to be followed when coding. For example:

    1. Relative and Absolute positioning: Putting a div inside another if one is with position absolute the other is relative it is impossible to add a float property to the element. How can I position the boxes where i want on the webpage without float. This is what I don't understand.

    I guess my question is what are the rules and guidelines for coding css for it to work the way you want it to?

    Any help will be appreciated.

  • #2
    New Coder
    Join Date
    Aug 2009
    Location
    public_html/cgi-bin/
    Posts
    91
    Thanks
    14
    Thanked 1 Time in 1 Post
    Hello mollovg and welcome to the CodingForums!

    Generally, I believe you should avoid positioning elements absolutely and relatively unless there is a specific reason to do so. Keeping elements in the flow of the document is great practice. Using floating elements can be useful, but if for some reason you decide this is not an ideal approach then you could use something like 'display: inline' to get elements side-by-side. Please note that for block-level elements (such as DIV's and P's), you'll need to use 'display: inline-block;'.

    Make sure you look at the CSS 'margin' style, as this can position your element away from others. Also look into 'padding' if you haven't already.

    Some useful links for CSS guidance are as follows:
    W3C Schools CSS Tutorial
    W3C Standards
    CSS Validator

    If you'd like anymore guidance or help with specifics then please don't hesitate to create a new thread or post on here again (if relevant).

    Kind Regards
    Owen Ayres

  • #3
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    409
    Thanks
    2
    Thanked 32 Times in 32 Posts
    If you want specific solutions to a positioning problem then you need to provide specific details and a link to the page so we can see what is creating the problem. The best resource for CSS detail usage is:

    https://developer.mozilla.org/en-US/docs/Web/CSS

    W3schools is a little too lightweight; okay for quick reference, but it is frequently out of date and sometimes contains incorrect information.

    Cd&
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&

  • #4
    New Coder
    Join Date
    Jul 2014
    Location
    Athens, Greece
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts
    check this link.
    Absolute, Relative, Fixed Positioning: How Do They Differ? | CSS-Tricks

    Will help you.

    What exactly want to do ????


  •  

    Posting Permissions

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