Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.

Thread Tools Display Modes
Share |
Old 09-11-2010, 03:30 PM
DayliDesign DayliDesign is offline
Junior Member
Join Date: 09-11-10
Posts: 21
iTrader: 0 / 0%
CSS margins in ie7 and firefox

Well at the moment I've got a site that looks how I wanted and thought I had coded it correctly but when I view it in firefox, things get a little mixed up with the margins


#hr_black { margin: 15px; background-image: url('Images/hr_black_1280.gif'); height: 2px; } img.servicesimg { margin: 15px 15px 0px 15px; float: left; border: 1px black solid; clear: left; }

<div id="content"> <a href="webservices.html"> <img class="servicesimg" alt="" src="Images/WebDesign.gif" /></a> <h2>Web Design</h2> <div id="hr_black"></div> <p class="p1"><a class="contentlink" href="webservices.html">More info</a>.</p> <a href="logoservices.html"> <img class="servicesimg" src="images/LogoDesign.gif" alt="" /></a> <h2>Logo Design</h2> <div id="hr_black"></div> <p class="p1"><a class="contentlink" href="logoservices.html">More info</a>.</p> <a href="graphicservices.html"> <img class="servicesimg" src="images/GraphicDesign.gif" alt="" /></a> <h2>Graphic Design</h2> <div id="hr_black"></div> <p class="p1"> <a class="contentlink" href="graphicservices.html">More Info.</a></p> </div>
When viewed in firefox, the "#hr_black" will go under the image and it's left margin is 15px from the "#content". In ie7 the left margin of the "#hr_black" is 15px from the image. I would like it to be 15px from the left of the image in firefox as well.
Reply With Quote



Old 09-14-2010, 08:49 AM
skodicious's Avatar
skodicious skodicious is offline
Join Date: 06-10-09
Posts: 35
iTrader: 0 / 0%
Perhaps you need a clearer (clear:both) on the h2 and/or the #hr_black
Reply With Quote
Old 09-14-2010, 11:47 AM
DayliDesign DayliDesign is offline
Junior Member
Join Date: 09-11-10
Posts: 21
iTrader: 0 / 0%
Originally Posted by ciint View Post
You just write css like as for margin:
img.servicesimg {
margin-left: 15px;
float: left;
border: 1px black solid;
clear: left;
So what your suggesting is to write out each margin as a separate line of code?
Reply With Quote
Old 09-15-2010, 09:07 AM
simpson.john54 simpson.john54 is offline
Junior Member
Join Date: 09-15-10
Posts: 3
iTrader: 0 / 0%
thnks for the above code even i was getting same mistake.........

[remove fake sig]

Last edited by ~CReed; 09-15-2010 at 09:27 AM.
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IE and Firefox natcguerreiro Coding Forum 15 10-21-2007 02:17 PM
Firefox v.3 oddjob Tech Talk 3 12-18-2006 08:18 AM
Firefox 2.0 littleFella Tech Talk 24 09-29-2006 11:55 AM
FF, IE, Opera, Borders, Padding, Margins Mrblogs Coding Forum 3 05-01-2006 11:03 AM
Firefox css Fusion Coding Forum 9 08-20-2004 09:30 AM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 06:50 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC