473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Anchor Styling ... Could someone please help me with this?

Hello,

I am applying a style to a anchor tag. This anchor is created by an
ASP.NET page and is inside a list item.
I know the style is working because I applied it to the anchor in a
page that has only this.

.Test
{
background-color: #101010;
color: #E2E2E2;
padding: 4px 10px 6px 12px;
text-decoration: none;
font: normal 1.2em Verdana, Geneva, sans-serif;
}

<a href="Test.aspx" class="Test">Testing</a>

However, when I apply it to the anchor inside the list item I don't
get the bottom margin unless I add "display: block" to the style! But
then the background is extended 100%.

I don't know what is going on. I tried everything I could think off.
Here is the code where the Test style is giving me problems:
....
<li>
<label for="tbMessage" id="lMessage">Mensagem<span
class="Required">*</span></label>
<textarea name="tbMessage" rows="4" cols="20" id="tbMessage"></
textarea>
</li>
<li>
<a id="lbSubmit" class="Test"
href='javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("ctl00$ctl00$cphSite$cfSen dContact$lbSubmit",
"", true, "ContactForm", "", false, true))'>
Send
</a>
</li>
</ul>

Any idea why this is happening?

All I am trying to do is to make my anchor look as a simple button.

Thank You,
Miguel

Jun 27 '08 #1
1 2515
On Apr 27, 10:48 pm, shapper <mdmo...@gmail.comwrote:
Hello,

I am applying a style to a anchor tag. This anchor is created by an
ASP.NET page and is inside a list item.
I know the style is working because I applied it to the anchor in a
page that has only this.

.Test
{
background-color: #101010;
color: #E2E2E2;
padding: 4px 10px 6px 12px;
text-decoration: none;
font: normal 1.2em Verdana, Geneva, sans-serif;
}

<a href="Test.aspx" class="Test">Testing</a>

However, when I apply it to the anchor inside the list item I don't
get the bottom margin unless I add "display: block" to the style! But
then the background is extended 100%.

I don't know what is going on. I tried everything I could think off.
Here is the code where the Test style is giving me problems:
...
<li>
<label for="tbMessage" id="lMessage">Mensagem<span
class="Required">*</span></label>
<textarea name="tbMessage" rows="4" cols="20" id="tbMessage"></
textarea>
</li>
<li>
<a id="lbSubmit" class="Test"
href='javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("ctl00$ctl00$cphSite$cfSen dContact$lbSubmit",
"", true, "ContactForm", "", false, true))'>
Send
</a>
</li>
</ul>

Any idea why this is happening?

All I am trying to do is to make my anchor look as a simple button.

Thank You,
Miguel
I found the problem. Since I want to place the inputs in different
lines then the labels associated to them I added a display: block to
each label through CSS. When I do this somehow the <atag gets not
bottom padding ... have any idea why this is happening?

Thanks,
Miguel
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: nam | last post by:
could someone please help me with this bizarre problem - I've created a swf file at the top of my html page. The swf file (using Swish) is simply a menu of 5 links to 5 anchor points on the html...
4
by: deko | last post by:
I use named anchors to take users to specific parts of a long page. But I want to add some processing and do some things with my nav bar when users go to certain sections delineated by named...
5
by: elsenraat_76 | last post by:
Hello! I was wondering if someone could help me out with a problem I'm having? I'm trying to input a javascript value into an anchor tag (from a function), but don't have an event to call the...
6
by: Richard Brown | last post by:
Ok, I celebrate and rejoice in the Anchor property. So wonderful compared to the horrible 'resize' code I had to write in VB6, there is just no end to the wonders of VB.NET..... uh, ok..... BUT......
2
by: rudranee | last post by:
Hi, Can i hide an anchor tag in the mailto form?so that only the receiver is able to see it. The refernce code is given here: <FORM METHOD=POST ACTION="mailto:abc@xyz.com"...
3
by: rpaterso47 | last post by:
Hello, I am trying to insert a background image into URLs that link to pages outside our intranet and thus when clicked open a new window. The image used is the common one seen on many sites,...
20
by: Prisoner at War | last post by:
Hi, People, Is it possible to have an "empty" or "dummy" <a href***without*** the browser jumping back up the page?? I have a hyperlink that doesn't point to another document, but is used to...
3
by: shapper | last post by:
Hello, In a page I have: 1. An input (type="submit") button that submits a form. 2. An anchor that cancels the form submission and redirects the user to a page. I am trying to make both look...
6
by: shapper | last post by:
Hello, On a bottom of a form I have 2 buttons: Submit and Cancel. Submit is an input and submits the form. Cancel should just redirect the user to a new page without submitting the form. I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.