Problem with css

Discussion in 'HTML' started by Shelly, Oct 12, 2007.

  1. Shelly

    Shelly Guest

    I want to have two links on a single line. The css I have inherited (I am a
    php person and not much on css) makes them come out on individual lines with
    a long white bar under and in white font.
    Whether or not I specify style="main" the problem occurs. If I delete the
    css fle include, then it works correctly. Can anyone help this novice?

    Sheldon

    Here is my test code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    @import url("css/styles.css");
    </style>
    <title>Untitled Document</title>
    </head>
    <body>
    <a href="mailto:">without_1&nbsp;&nbsp;</a>
    <a href="mailto:">without_2</a>
    <a href="mailto:" style="main">main_1&nbsp;&nbsp;</a>
    <a href="mailto:" style="main">main_2</a>
    </body>
    </html>

    Here is the css file:

    body {
    background:#11418b;
    margin:0 auto;
    padding:0;
    font-family:"Trebucht MS", Verdana, Arial, Helvetica, sans-serif;
    }
    #wrapper {
    position:absolute;
    border:0;
    margin:0 auto;
    width:900px;
    height:700px;
    text-align:left;
    background-color:#ab0801;
    left: 12px;
    top: 96px;
    z-index: 5;
    }

    #header {
    background-color: #ab0801;
    background-image: url(../i/header_bg.jpg);
    color: #fff;
    position:absolute;
    left:10px;
    width: 900px;
    }

    #menu {
    position:absolute;
    left:5px;
    width:160px;
    height:auto;
    z-index:1;
    padding: 5px;
    top: 5px;
    color: #FFFFFF;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
    }

    #content {
    position:absolute;
    left:184px;
    top:5px;
    width:700px;
    height:680px;
    z-index:2;
    background-color: #CCCCCC;
    padding: 5px;
    }

    a:link {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #FFFFFF;
    font-size: 14px;
    font weight: bold;
    border-bottom: thin #FFFFFF solid;
    display: block;
    padding-bottom: 3px;
    text-decoration: none;
    }

    a:hover {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #CCCCCC;
    font-size: 14px;
    font weight: bold;
    border-bottom: thin #FFFFFF solid;
    display: block;
    padding-bottom: 3px;
    text-decoration: none;
    }

    a:visited {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #FFFFFF;
    font-size: 14px;
    font weight: bold;
    border-bottom: thin #FFFFFF solid;
    display: block;
    padding-bottom: 3px;
    text-decoration: none;
    }
    a.main:link {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #0000CC;
    font-size: 16px;
    font weight: bold;
    text-decoration: none;
    border-bottom: none;
    width: 130px;
    display: block;
    padding-bottom: 3px;
    }

    a.main:hover {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #000000;
    font-size: 16px;
    font weight: bold;
    width: 130px;
    text-decoration: none;
    border-bottom: none;
    display: block;
    padding-bottom: 3px;
    }

    a.main:visited {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #0000CC;
    font-size: 16px;
    font weight: bold;
    width: 130px;
    text-decoration: none;
    border-bottom: none;
    display: block;
    padding-bottom: 3px;
    }
    Shelly, Oct 12, 2007
    #1
    1. Advertising

  2. Shelly schreef:
    > I want to have two links on a single line. The css I have inherited (I am a
    > php person and not much on css) makes them come out on individual lines with
    > a long white bar under and in white font.
    > Whether or not I specify style="main" the problem occurs. If I delete the
    > css fle include, then it works correctly. Can anyone help this novice?
    >
    > Sheldon
    >

    [snipped code]

    Can you provide a link to the page?

    We're a little reluctant to copy/paste the code you gave.


    --
    Rob Waaijenberg
    Rob Waaijenberg, Oct 12, 2007
    #2
    1. Advertising

  3. Shelly

    John L. Guest

    Shelly wrote:
    > I want to have two links on a single line. The css I have inherited (I am a
    > php person and not much on css) makes them come out on individual lines with
    > a long white bar under and in white font.
    > Whether or not I specify style="main" the problem occurs. If I delete the
    > css fle include, then it works correctly. Can anyone help this novice?
    >
    > Sheldon
    >
    > Here is my test code:


    <snip>

    It should be class="main", not style="main".

    <a href="mailto:" class="main">main_2</a>

    The links appear on different lines because of the 'display: block;'
    declarations in the CSS. Try changing your stylesheet so the a rules
    look like this:

    a:link {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #FFFFFF;
    font-size: 14px;
    font weight: bold;
    text-decoration: none;
    }

    a:hover {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #CCCCCC;
    font-size: 14px;
    font weight: bold;
    text-decoration: none;
    }

    a:visited {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #FFFFFF;
    font-size: 14px;
    font weight: bold;
    text-decoration: none;
    }
    a.main:link {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #0000CC;
    font-size: 16px;
    font weight: bold;
    text-decoration: none;
    }

    a.main:hover {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #000000;
    font-size: 16px;
    font weight: bold;
    text-decoration: none;
    }

    a.main:visited {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #0000CC;
    font-size: 16px;
    font weight: bold;
    text-decoration: none;
    }
    John L., Oct 12, 2007
    #3
  4. Shelly

    Shelly Guest

    Thank you very much. That did the trick!

    Sheldon

    "John L." <> wrote in message
    news:...
    > Shelly wrote:
    >> I want to have two links on a single line. The css I have inherited (I
    >> am a php person and not much on css) makes them come out on individual
    >> lines with a long white bar under and in white font.
    >> Whether or not I specify style="main" the problem occurs. If I delete
    >> the css fle include, then it works correctly. Can anyone help this
    >> novice?
    >>
    >> Sheldon
    >>
    >> Here is my test code:

    >
    > <snip>
    >
    > It should be class="main", not style="main".
    >
    > <a href="mailto:" class="main">main_2</a>
    >
    > The links appear on different lines because of the 'display: block;'
    > declarations in the CSS. Try changing your stylesheet so the a rules look
    > like this:
    >
    > a:link {
    > font-family: Verdana, Arial, Helvetica, sans-serif;
    > color: #FFFFFF;
    > font-size: 14px;
    > font weight: bold;
    > text-decoration: none;
    > }
    >
    > a:hover {
    > font-family: Verdana, Arial, Helvetica, sans-serif;
    > color: #CCCCCC;
    > font-size: 14px;
    > font weight: bold;
    > text-decoration: none;
    > }
    >
    > a:visited {
    > font-family: Verdana, Arial, Helvetica, sans-serif;
    > color: #FFFFFF;
    > font-size: 14px;
    > font weight: bold;
    > text-decoration: none;
    > }
    > a.main:link {
    > font-family: Verdana, Arial, Helvetica, sans-serif;
    > color: #0000CC;
    > font-size: 16px;
    > font weight: bold;
    > text-decoration: none;
    > }
    >
    > a.main:hover {
    > font-family: Verdana, Arial, Helvetica, sans-serif;
    > color: #000000;
    > font-size: 16px;
    > font weight: bold;
    > text-decoration: none;
    > }
    >
    > a.main:visited {
    > font-family: Verdana, Arial, Helvetica, sans-serif;
    > color: #0000CC;
    > font-size: 16px;
    > font weight: bold;
    > text-decoration: none;
    > }
    Shelly, Oct 12, 2007
    #4
  5. Shelly wrote:
    > Thank you very much. That did the trick!


    But Shelly forget the CSS, if you are a PHP coder what the hell are you
    doing with "mailto" in links?

    <your code>
    <a href="mailto:">without_1&nbsp;&nbsp;</a>
    <a href="mailto:">without_2</a>
    <a href="mailto:" style="main">main_1&nbsp;&nbsp;</a>
    <a href="mailto:" style="main">main_2</a>
    </your code>

    Tisk-tisk! And what happens to the webmail only folks? Should be at least:

    <a href="processing.php?do=without1">without_1&nbsp;&nbsp;</a>
    <a href="processing.php?do=without2>without_2</a>
    <a href="processing.php?do=main1" style="main">main_1&nbsp;&nbsp;</a>
    <a href="processing.php?do=main2" style="main">main_2</a

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Oct 12, 2007
    #5
  6. Shelly

    Shelly Guest

    "Jonathan N. Little" <> wrote in message
    news:8e65d$470f8251$40cba7c7$...
    > Shelly wrote:
    >> Thank you very much. That did the trick!

    >
    > But Shelly forget the CSS, if you are a PHP coder what the hell are you
    > doing with "mailto" in links?


    If I want to sent a packaged email from the web, or even have the
    composition of the text, etc. done in the web app, then I do just as you say
    (and have done so before many times). However, this is for a small company
    for internal use, and part of the app is to send email to clients not using
    this app. I want the app to bring up the sender's own email client and have
    the address be in there automatically. They will then write whatever they
    want as text for the email. "mailto" does this perfectly, as the users all
    have email clients.

    Did I misinterpret what you are saying?

    Sheldon


    >
    > <your code>
    > <a href="mailto:">without_1&nbsp;&nbsp;</a>
    > <a href="mailto:">without_2</a>
    > <a href="mailto:" style="main">main_1&nbsp;&nbsp;</a>
    > <a href="mailto:" style="main">main_2</a>
    > </your code>
    >
    > Tisk-tisk! And what happens to the webmail only folks? Should be at least:
    >
    > <a href="processing.php?do=without1">without_1&nbsp;&nbsp;</a>
    > <a href="processing.php?do=without2>without_2</a>
    > <a href="processing.php?do=main1" style="main">main_1&nbsp;&nbsp;</a>
    > <a href="processing.php?do=main2" style="main">main_2</a
    >
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIO
    > http://www.LittleWorksStudio.com
    Shelly, Oct 12, 2007
    #6
  7. Shelly wrote:
    > "Jonathan N. Little" <> wrote in message
    > news:8e65d$470f8251$40cba7c7$...
    >> Shelly wrote:
    >>> Thank you very much. That did the trick!

    >> But Shelly forget the CSS, if you are a PHP coder what the hell are you
    >> doing with "mailto" in links?

    >
    > If I want to sent a packaged email from the web, or even have the
    > composition of the text, etc. done in the web app, then I do just as you say
    > (and have done so before many times). However, this is for a small company
    > for internal use, and part of the app is to send email to clients not using
    > this app. I want the app to bring up the sender's own email client and have
    > the address be in there automatically. They will then write whatever they
    > want as text for the email. "mailto" does this perfectly, as the users all
    > have email clients.
    >
    > Did I misinterpret what you are saying?
    >


    Not sure if I understand what you are saying. The persons clicking these
    links *only* employees of this company? Or people *outside* of this
    company? I.e., it this private on an intranet, or public on the Internet?

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Oct 12, 2007
    #7
  8. Shelly

    Shelly Guest

    "Jonathan N. Little" <> wrote in message
    news:2d88a$470f8f64$40cba7c7$...
    > Shelly wrote:
    >> "Jonathan N. Little" <> wrote in message
    >> news:8e65d$470f8251$40cba7c7$...
    >>> Shelly wrote:
    >>>> Thank you very much. That did the trick!
    >>> But Shelly forget the CSS, if you are a PHP coder what the hell are you
    >>> doing with "mailto" in links?

    >>
    >> If I want to sent a packaged email from the web, or even have the
    >> composition of the text, etc. done in the web app, then I do just as you
    >> say (and have done so before many times). However, this is for a small
    >> company for internal use, and part of the app is to send email to clients
    >> not using this app. I want the app to bring up the sender's own email
    >> client and have the address be in there automatically. They will then
    >> write whatever they want as text for the email. "mailto" does this
    >> perfectly, as the users all have email clients.
    >>
    >> Did I misinterpret what you are saying?
    >>

    >
    > Not sure if I understand what you are saying. The persons clicking these
    > links *only* employees of this company? Or people *outside* of this
    > company? I.e., it this private on an intranet, or public on the Internet?


    The only people using this will be employees of the company. It is not for
    public consumption. It will actually be on the internet, so that they can
    work from home, etc., but it will be password protected so that only company
    employees can log in. Even mobile, they will have email clients on their
    laptops or home computers. I don't have to worry about the general public
    needing to send an email this way.

    Shelly
    Shelly, Oct 12, 2007
    #8
  9. Shelly

    Alfred Guest

    On Fri, 12 Oct 2007 14:21:04 +0200, Rob Waaijenberg
    <> wrote:

    >Shelly schreef:
    >> I want to have two links on a single line. The css I have inherited (I am a
    >> php person and not much on css) makes them come out on individual lines with
    >> a long white bar under and in white font.
    >> Whether or not I specify style="main" the problem occurs. If I delete the
    >> css fle include, then it works correctly. Can anyone help this novice?
    >>
    >> Sheldon
    >>

    >[snipped code]
    >
    >Can you provide a link to the page?
    >
    >We're a little reluctant to copy/paste the code you gave.


    Why ? Can it be malignant ?
    Alfred, Oct 16, 2007
    #9
  10. Shelly

    Bergamot Guest

    Alfred wrote:
    > On Fri, 12 Oct 2007 14:21:04 +0200, Rob Waaijenberg
    > <> wrote:
    >>
    >>Can you provide a link to the page?
    >>
    >>We're a little reluctant to copy/paste the code you gave.

    >
    > Why ? Can it be malignant ?


    You must be new around here.

    "Malignant" isn't the issue, and "reluctant" was probably being nice.

    It's a PITA for us to copy/paste code and make our own web page to help
    with some "problem". If you expect assistance, make it as easy as
    possible for us to help you. Posting code is not the way. Posting a URL
    is. It's as simple as that.

    Whether you agree or not is irrelevant - it's the accepted practice of
    this group and most others related to web authoring. BTW, not having a
    publicly available server is no excuse. There are plenty of places to
    post a test page for free if you need to.

    BTW, you should have considered lurking here for a while or reading the
    group archives before posting. Then you'd have found this answer
    yourself. Now that you've spoken up, we see you have done neither of
    those things, which makes you sound either clueless or troll-like,
    neither of which is in your favor. This behavior is characteristic of
    google gropers. If you want any respect around here, don't be like them.

    --
    Berg
    Bergamot, Oct 16, 2007
    #10
  11. Alfred schreef:
    > On Fri, 12 Oct 2007 14:21:04 +0200, Rob Waaijenberg
    > <> wrote:
    >
    >> Shelly schreef:
    >>> I want to have two links on a single line. The css I have inherited (I am a
    >>> php person and not much on css) makes them come out on individual lines with
    >>> a long white bar under and in white font.
    >>> Whether or not I specify style="main" the problem occurs. If I delete the
    >>> css fle include, then it works correctly. Can anyone help this novice?
    >>>
    >>> Sheldon
    >>>

    >> [snipped code]
    >>
    >> Can you provide a link to the page?
    >>
    >> We're a little reluctant to copy/paste the code you gave.

    >
    > Why ? Can it be malignant ?


    Who knows???

    If you provide a link to a real webpage we can assess the code 'in the
    wild' so to speak. We get to see all the parts that matter, and no
    chance that anything gets accidently deleted or mistyped.

    I realize that you would not let that happen,
    but then again...


    --
    Rob
    Rob Waaijenberg, Oct 16, 2007
    #11
  12. Alfred wrote:
    > On Fri, 12 Oct 2007 14:21:04 +0200, Rob Waaijenberg
    > <> wrote:


    >> We're a little reluctant to copy/paste the code you gave.

    >
    > Why ? Can it be malignant ?


    No because it would be rather pointless because he does not have related
    resources:

    @import url("css/styles.css");
    and
    background-image: url(../i/header_bg.jpg);

    on his local system that may have something to do with the problem. That
    is why you see posted here so often, "Don't post code, post a URL"


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Oct 16, 2007
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    708
    clintonG
    Dec 24, 2004
  2. tom watson

    print.css and screen.css

    tom watson, Sep 9, 2003, in forum: HTML
    Replies:
    1
    Views:
    458
    Jukka K. Korpela
    Sep 9, 2003
  3. Joshua Beall
    Replies:
    1
    Views:
    419
    Bertilo Wennergren
    Dec 10, 2003
  4. Noozer
    Replies:
    10
    Views:
    2,068
    Mitja
    Oct 13, 2004
  5. Titus A Ducksass - AKA broken-record
    Replies:
    6
    Views:
    648
    Titus A Ducksass - AKA broken-record
    Nov 15, 2004
Loading...

Share This Page