Floating Elements. Help with getting something to the left

Discussion in 'CSS' started by jaredgravatt, May 24, 2008.

  1. #1
    Hi everyone.

    I have been learning HTML and have built my first page using HTML it is uploaded to www.entrepreneurprofit.co.nz/my-website.html.

    I am trying to get it to match www.entrepreneurprofit.co.nz exactly, which I built in Dream Weaver.

    I am trying to use tables as little as possible and am having trouble with getting the advert for the free real estate package to the left without having to use a table.

    Now from what I have read I should be using a floating element, but not exactly sure how to impliment this.

    Can someone please help !!!!
     
    jaredgravatt, May 24, 2008 IP
  2. jaredgravatt

    jaredgravatt Active Member

    Messages:
    849
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    This is what I have done so far

    Not sure if it is right.

    And I'm not quite sure how to finish it.

    And it says I have to put this somewhere;

     
    jaredgravatt, May 24, 2008 IP
  3. steelfrog

    steelfrog Peon

    Messages:
    537
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I took a quick look at your code and it became pretty obvious where your problem lies. You haven't attached a CSS file. The code you've posted above is CSS, not (X)HTML. I doesn't parse the same way.

    You'll need to create a CSS file. Most HTML editors support CSS now or you can just do it through Notepad. Copy and paste the previous code and save as something like "style.css". Now, you need to tell your HTML file to load your CSS when the page loads so it can be applied. This is done by placing the following code into your <head>:

    
    <link rel="stylesheet" type="text/css" href="style.css" />
    Code (markup):
    Good luck!
     
    steelfrog, May 24, 2008 IP
  4. jaredgravatt

    jaredgravatt Active Member

    Messages:
    849
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #4
    I'm lost.

    Can you please explain some more - or better still tell me how to do what I want to do without using CSS as I am still learning.
     
    jaredgravatt, May 24, 2008 IP
  5. ferman

    ferman Well-Known Member

    Messages:
    968
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    140
    #5
    if you don't want to use external CSS
    then you can just use inline style i.e

    style="float:left;" insert it in tag where your advert is placed
     
    ferman, May 26, 2008 IP