h1 style affecting jAlert implementation
Page 1 of 1
h1 style affecting jAlert implementation
When I change the height and width of h1 in an external style sheet it screws up my implementation of jAlert. Is this poor css practice? Thanks for any suggestions.Here is my style sheet named teststyle.css:
h1 {
height: 120px;
width: 700px;
}
here is my html document if you are interested:
<html>
<head>
<title>Tester</title>
<link rel="stylesheet" type="text/css" href="teststyle.css" />
<script type="text/javascript" src="latestjquery.js"></script>
<script type="text/javascript" src="jquery.alerts.js"></script>
<link href="jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div>
<p><input type="submit" value="Click to get jAlert" onclick="validate()" /></p>
</div>
<script type="text/javascript">
function validate(){$(document).ready(function(){
jAlert('here is alert','Test title');});
}
</script>
</body>
</html>
Re: h1 style affecting jAlert implementation
you should use class or id if you want to style specific element h1 will generally style all h1 element in the document.h1 style affecting jAlert
thanks for the response. I do wish to modify all h1 elements in the document as well as other documents. I stripped down one of the documents to isolate the issue for purposes of exposition. What I don't understand is why changes to h1 affect the appearance of the jAlert box. I suspect that it is poor practice to modify the height or width of h1. thanks again.Re: h1 style affecting jAlert implementation
yah I THINK it is poor practice to modify the height or width of h1 you should use font-size etc because heading is a text not the box.in jalert maybe they use h1 somewhere that's why its becoming the problem because you have given too big height or width try removing height and width properties from your h1 style and add font-size.
Re: h1 style affecting jAlert implementation
You were right. I removed height and width from h1 and put the headings inside a div of same dimensions. the effect is the same and jAlert works fine now. thanks for all your help XainPro, with respect to this as well as my previous post.Re: h1 style affecting jAlert implementation
My pleasure :)Page 1 of 1