Jump to content

css problems concerning the following code


Ant

Recommended Posts

I have the following code that I cannot get to react to my css:

 

 

<div>random text</div>

 

<div class="line_specs"><a style="cursor: pointer;" title="tool tip" onclick="window.open('http://www.mydomain/specs.com', 'StatusBar', 'toolbar=no,resizable=no,scrollbars=yes,width=750,height=500,left=100,top=100');">

<em><strong>Line Specifications</strong></em></a></div>

 

 

No matter what I do I cannot reduce the amount of space above the word "Line Specifications".It's like there is an extra space above it.

 

I tried using css and effecting the "a" tag to reduce the space like so:

 

.line_specs a{

margin: 0px 0px 0px 0px;

 

}

 

I tried adding a p tag to the word "line specifications" but that didn't work either.

.line_specs p{

margin: 0px 0px 0px 0px;

 

}

 

If I take the code and remove all the onclick info etc and just test my css with say a simple p tag the css margin works fine.

 

 

Any help is appreciated.

 

Thanks

A.

Link to comment
Share on other sites

When I test the exact code you have provided in a new HTML file, I'm not getting any space between the two elements, so there must be something else going on. Could you post a link to the site (ideally) or a zip of the files (html, css, images) so we can see it in action?

 

Have you checked using standard CSS debugging tools -- Firebug for Firefox, the Chrome Console in Chrome, or IE's developer tools? Any of those should be able to tell you what is causing the spacing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...