How would I name this HTML code so I could edit it with CSS? [closed]


Tags: html,css

Problem :

I have this ad code to put on my website, but I need to put it at the bottom of the page (and centered). At the moment I have this code:

<center>
<script type="text/javascript">
var var1 = "728";
var var2 = "90";
var var3 = "728x90";
var var4 = "21676";
var var5 = "d119a02021ce7f2804da25fd308f24b0";
</script><script type="text/javascript"src="//cdn.adshexa.com/show_ads.php"></script>
</center>

How could I name the piece of code so I could edit it like

.nameofclass {
    position: absolute;
    left: 100px;
    top: 150px;
}

But the left and top of the position be the bottom middle.

So I pretty much need to know how to name it a class then in the CSS change it to the bottom middle position.



Solution :

You'll want something like:

<div class="nameofclass">Some contents</div>

Avoid the center tag; it's not supported. If you need the element to appear centered, do it in the CSS.

As already stated, it's considered polite to research your question before asking. This should be answered by any CSS tutorial.


    CSS Howto..

    How to change class of valid form field - jQuery form validation plugin

    How to make a pentagon fold in half with CSS animation?

    How to make css for navbar (Jquery Mobile) bottom up submenu automatic?

    How can I fix this parralax

    How to make a div 100% width minus a certain amount?

    Style elements based on how many elements there are using just CSS?

    How to prevent css borders from floating to the top of parent div

    Three inline divs: how to make display all three inline OR three block (NOT 2 + 1)?

    How to get Floating DIVs inside fixed-width DIV to continue horizontally?

    How to add css and js files on node pages independent of the theme?

    How to remove blue border around the button in Firefox?

    How to animate 2 parallel lines in order to form an X on click using CSS and JQuery

    how to accomplish this border effect in css?

    How can I give the current page's link a disabled look?

    How to create rolldown content with css?

    How are CSS properties implemented by different browsers? [closed]

    How to create dynamic table 4 columns per row using GridView?

    How to remove line between two diagonally opposite css scalene triangles?

    How do you group similar n-th child selectors? [duplicate]

    How to add event handlers to DIVS with CSS classes containing a particular string?

    How can i use the visibility attribute in css to make my submenu appear and reappear?

    How to setting a Class in a conditional statement of Javascript?

    How can I get as much of the text into a DIV row as possible?

    How to change width to fill the remaining space (CSS)

    How can I specify relative positioning in HTML?

    CSS: how do I add Twitter Bootstrap to an existing web page with it's own CSS?

    Bootstrap modal: how to fade in, but immediately disappear on close

    css floating problem: how to get a left float to wrap around a right float

    Section background image showing empty space in bottom [closed]

    How to get page-header and nav-pills to appear on the same line