Jump to content

css coding problem


DonaldFaulknor

Recommended Posts

/* Profile */
.updateStatus {
  background: url("http://inyoursocialnetwork.netne.net/members/Whiteboard.jpg") no-repeat center top #008d35;
  border: 0 none;
  color:#008d35;
  cursor:text;
  font-family:Kaushan Script;
  font-size:110%;
  width: 230px;
  padding-left:16px;
  padding-top:12px;
  height: 157px;
}

/* Homepage */
.updateStatus1 {
  background: url("http://inyoursocialnetwork.netne.net/members/Whiteboard.jpg") no-repeat center top #008d35;
  border: 0 none;
  color:#008d35;
  cursor:text;
  font-family:Kaushan Script;
  font-size:110%;
  width: 246px;
  padding-left:16px;
  padding-top:12px;
  height: 169px;
}

<!-- Profile -->
<div style=\"float:right; padding:24px; margin-top:96px\">
    <form action=\"update-status.php?id=$_SESSION[user_id]\" method=\"POST\">
        <input type=\"hidden\" name=\"users_id\" value=\"$_SESSION[user_id]\" />
        <textarea class=\"updateStatus\" name=\"statuses\"></textarea><br />
        <center><span title=\"Update Your Status\"><input class=\"dryErasePen\" type=\"submit\" value=\"\" /></span></center>
    </form>
    </div>

<div style=\"float:right; padding:24px; margin-top:96px\">
    <form action=\"update-status.php?id=$_SESSION[user_id]\" method=\"POST\">
        <input type=\"hidden\" name=\"users_id\" value=\"$_SESSION[user_id]\" />
        <textarea class=\"updateStatus1\" name=\"statuses\"></textarea><br />
        <center><span title=\"Update Your Status\"><input class=\"dryErasePen\" type=\"submit\" value=\"\" /></span></center>
    </form>
    </div>

 

I had both html codes set to the same css, and it worked fine for a week.  And without changing anything, all of a sudden, the Box model applied to one page but not the other page.  The first css, padding adds to the overall width, the second css, it doesn't.  Why did it change by itself.  I never even touched the code.

Link to comment
https://forums.phpfreaks.com/topic/256356-css-coding-problem/
Share on other sites

They don't if you add updateStatus as both textarea classes, they should look the same, are you looking at them in different browsers? Some browsers add a margin to the body tag, some add padding, this is probably being inherited, try adding:

 

 

* {
   margin: 0;
   padding: 0;
}

Link to comment
https://forums.phpfreaks.com/topic/256356-css-coding-problem/#findComment-1314265
Share on other sites

Thanks for verifying my confusion.

 

Yes, I DO have a padding and margin reset and NO, they are being viewed in the same browser.

 

It's not a padding/margin variation between browsers or whatever, the difference from one code to the other is EXACTLY what the padding is set at.  Therefore, I have concluded that for one code, padding adds to the overall width and for the other code, it doesn't.  I have to wonder if it's do to an inheritance, sometimes inheritant properties can be hard to find.

Link to comment
https://forums.phpfreaks.com/topic/256356-css-coding-problem/#findComment-1314270
Share on other sites

it's cool, I mean, if the different css' are working (for whatever reason), I can just keep them this way.  It's just irritating not to know why they require to be different.  Like I said, I think it's an inheritance problem.  One page is inheriting different properties than another page.

Link to comment
https://forums.phpfreaks.com/topic/256356-css-coding-problem/#findComment-1314283
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.