Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Problem with css

Reply
Thread Tools

Problem with css

 
 
Shelly
Guest
Posts: n/a
 
      10-12-2007
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="(E-Mail Removed)">without_1&nbsp;&nbsp; </a>
<a href="(E-Mail Removed)">without_2</a>
<a href="(E-Mail Removed)" style="main">main_1&nbsp;&nbsp;</a>
<a href="(E-Mail Removed)" 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;
}


 
Reply With Quote
 
 
 
 
Rob Waaijenberg
Guest
Posts: n/a
 
      10-12-2007
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
 
Reply With Quote
 
 
 
 
John L.
Guest
Posts: n/a
 
      10-12-2007
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="(E-Mail Removed)" 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;
}
 
Reply With Quote
 
Shelly
Guest
Posts: n/a
 
      10-12-2007
Thank you very much. That did the trick!

Sheldon

"John L." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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="(E-Mail Removed)" 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;
> }



 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      10-12-2007
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="(E-Mail Removed)">without_1&nbsp;&nbsp; </a>
<a href="(E-Mail Removed)">without_2</a>
<a href="(E-Mail Removed)" style="main">main_1&nbsp;&nbsp;</a>
<a href="(E-Mail Removed)" 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
 
Reply With Quote
 
Shelly
Guest
Posts: n/a
 
      10-12-2007

"Jonathan N. Little" <(E-Mail Removed)> wrote in message
news:8e65d$470f8251$40cba7c7$(E-Mail Removed)...
> 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="(E-Mail Removed)">without_1&nbsp;&nbsp; </a>
> <a href="(E-Mail Removed)">without_2</a>
> <a href="(E-Mail Removed)" style="main">main_1&nbsp;&nbsp;</a>
> <a href="(E-Mail Removed)" 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



 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      10-12-2007
Shelly wrote:
> "Jonathan N. Little" <(E-Mail Removed)> wrote in message
> news:8e65d$470f8251$40cba7c7$(E-Mail Removed)...
>> 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
 
Reply With Quote
 
Shelly
Guest
Posts: n/a
 
      10-12-2007

"Jonathan N. Little" <(E-Mail Removed)> wrote in message
news:2d88a$470f8f64$40cba7c7$(E-Mail Removed)...
> Shelly wrote:
>> "Jonathan N. Little" <(E-Mail Removed)> wrote in message
>> news:8e65d$470f8251$40cba7c7$(E-Mail Removed)...
>>> 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


 
Reply With Quote
 
Alfred
Guest
Posts: n/a
 
      10-16-2007
On Fri, 12 Oct 2007 14:21:04 +0200, Rob Waaijenberg
<(E-Mail Removed)> 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 ?
 
Reply With Quote
 
Bergamot
Guest
Posts: n/a
 
      10-16-2007
Alfred wrote:
> On Fri, 12 Oct 2007 14:21:04 +0200, Rob Waaijenberg
> <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Layout question - how to duplicate a table layout with CSS Eric ASP .Net 4 12-24-2004 04:54 PM
confused - html validates, css validates but validate css from the html causes errors Titus A Ducksass - AKA broken-record HTML 6 11-15-2004 12:59 PM
Set CSS property equal to another CSS property? Noozer HTML 10 10-13-2004 09:20 PM
Is there a way to set the a CSS property to be explicitly the same as another CSS property? Joshua Beall HTML 1 12-10-2003 07:21 PM
print.css and screen.css tom watson HTML 1 09-09-2003 02:48 PM



Advertisments