How do i position the text in html?
I am using a menu builder to make a navigation menu for my site. My text does not appear where I want it to so I want to make it a little higher. This is my html code for the text:
<font style="font-size:19px" color="#000000" face="Arial">Buy</font>
I do not know html so I cannot do it myself but can anyone put a code inside the one above to make it appear about 5px higher? Thanks!
Public Comments
- Go here: http://www.w3schools.com/ All your questions can be answered
- It is not very simple to explain. You must put the code in a DIV and use CSS to position it. ✩
- We would need the whole HTML source for the page to help you, it is associated with the style and layout of the page. If you want me to do it for you send me the page source. :-)
- You can place it in a div and then add the position. Say the position is 150pixels from the top of the page and 200 pixels from the left. It will be something like: (you will have to put the next 5 lines in one as YA won't show it right) <div style="position:absolute; top:150px; left:200px; z-index:10;"> <font style="font-size:19px" color="#000000" face="Arial">Buy</font> </div>
- Although you should be using a separate stylesheet to separate styling from content, and the <font> tag is depreciated and not really regarded as "standard" anymore, I'll post a simple solution for you. <p><a style="font-size:19px; color:#000000; font-family:Arial; line-height:2em;">Buy</a></p> Using the line-height will bump the text up for you. You should even use unordered lists for navigation. It makes it extremely simple to style and fix. For example; <ul> <li><a href="#">Item 1</a></li> <li><a href="#">Item 2</a></li> <li><a href="#">Item 3</a></li> <li><a href="#">Item 4</a></li> </ul> Good luck
- You position your text by using CSS however the style does not have to be applied to a DIV. You can apply a style to many of the HTML elements such as a paragraph for example. The reason it would work in a paragraph that is not in a DIV is because that paragraph would be held in the body tag element. <p style="text-align:center"> This text is aligned in the center of its containing element. Which may be the body of the page itself.</p> You really should learn CSS very well it will help you out a lot in the future if you plan on building web pages or sites. I hope that helps
Powered by Yahoo! Answers