Ant Posted September 27, 2012 Report Share Posted September 27, 2012 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. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted September 27, 2012 Report Share Posted September 27, 2012 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. Quote Link to comment Share on other sites More sharing options...
Ant Posted September 27, 2012 Author Report Share Posted September 27, 2012 Here's the page: I used firebug to see whats going on but I cannot find the problem and usually I find something I missed. I'm stumped on this one. Thanks A. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted September 27, 2012 Report Share Posted September 27, 2012 When I look in firebug (see screenshot) I see a line break within the <a> just before the <em></em>. I'm not sure why that is there -- perhaps being inserted by the CMS you are using or something? -- but that's what is causing the space. Quote Link to comment Share on other sites More sharing options...
Ant Posted September 30, 2012 Author Report Share Posted September 30, 2012 Ben, thank you. The problem was indeed the CMS (wordpress). In the html view there was a return in the code but I guess for some reason, even though I though spaces and returns do not effect the code in html, it did in this instance. A. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.