h1 style affecting jAlert implementation
6 posts Page 1 of 1
h1 style affecting jAlert implementationWhen 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:
here is my html document if you are interested:
<link rel="stylesheet" type="text/css" href="teststyle.css" />
<link href="jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />
<p><input type="submit" value="Click to get jAlert" onclick="validate()" /></p>
jAlert('here is alert','Test title');});
Re: h1 style affecting jAlert implementationyou 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 jAlertthanks 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 implementationyah 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 implementationYou 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 implementationMy pleasure :)
Page 1 of 1