HELP!!!! CSS (Stylise an Element)

Discussion in 'CSS' started by alexpostiglione, Jul 16, 2008.

  1. #1
    Hi Everyone,

    I am really stuck on how i am able to Stylise an element with id “Logo” so that it is placed at the page coordinates (50,100) and the font size is 150% the font size of the parent element.

    Does anyone know the CSS Code for this? I am a student and i am really struggling.

    alex
     
    alexpostiglione, Jul 16, 2008 IP
  2. Ledzf

    Ledzf Peon

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm not quite understand what you want to say, It sounds you need CSS position property.
    Maybe post your code will much more helpful.

    Regards.
     
    Ledzf, Jul 16, 2008 IP
  3. Erthy

    Erthy Peon

    Messages:
    254
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    
    #logo {
    position: absolute;
    top: 100px;
    left: 50px;
    font-size: 150%;
    }
    
    HTML:
     
    Erthy, Jul 16, 2008 IP
  4. Ledzf

    Ledzf Peon

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Maybe change the #logo to #Logo as he said id was "Logo.;)
     
    Ledzf, Jul 16, 2008 IP
  5. alexpostiglione

    alexpostiglione Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi Everyone,

    Thanks for the help, im literally running threw an old exam paper trying to get the correct answers as my lecturer hasnt been at all very helpful!

    Does anyone know the css code to:
    Stylise any checkboxes so that the background colour is red.
     
    alexpostiglione, Jul 17, 2008 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Depends-- Safari may or may not allow you to colour checkboxes (it allows you to colour selects, but not text inputs... or at least it didn't used to), and there is a simple way to do it which will certainly not work in IE6:
    input[type=checkbox] {
    background-color: #f00;
    }

    IE6 does not know what attribute selectors mean, so you'd have to give them all a class in the HTML (which is usually bad form, but needs to be done).

    As forms are something the browsers have more control over, you still may not be allowed to colour the background of a checkbox in all browsers, but I think you can.

    Again, I'm going to strongly disagree with the use of the answer posted above for the positioning. It would work, but it's usually not the best solution for positioning.
     
    Stomme poes, Jul 17, 2008 IP