Jump to content

p style border help!

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
j.lai

j.lai

    Newbie

  • Members
  • PipPip
  • 21 posts
So I'm working on an assignment for school and I'm having trouble with my border.
I want my border to border around my header and my body but when I try to enter something in my body parameters, it adds it under the border

Here is what the page looks like
Posted Image

Here is my code (sorry if it is messy)
<html> 


<SCRIPT TYPE="text/javascript"> 

<!-- 

//Disable right click script 

//visit http://www.rainbow.a...ia.com/scripts/ 

var message="Sorry, right-click has been disabled"; 

/////////////////////////////////// 

function clickIE() {if (document.all) {(message);return false;}} 

function clickNS(e) {if 

(document.layers||(document.getElementById&&!document.all)) { 

if (e.which==2||e.which==3) {(message);return false;}}} 

if (document.layers) 

{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} 

else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} 

document.oncontextmenu=new Function("return false") 

// --> 

</SCRIPT> 


<style type = "text/css">

html

{

	background-color:e5e5e5;

}



</style>



<center>

<p style="border: ridge 2px #99aabb; padding: 0px;background-color:ffffff; margin: 0; text-align: justify; line-height: 0px; color: #191970; font-size: 18px; height: 300px; width:1000px">



<head>

<img src = "C:\Users\Joey\Documents\My Dropbox\Interface Design\Assignments\Assignment 5\photos\Banner.png" ondragstart="return false" onselectstart="return false" >

<div style =" top: 125; left: 500px; position: absolute; z-index: 1;"> 

<a href="file:///C:/Users/Joey/Documents/My%20Dropbox/Interface%20Design/Assignments/Assignment%205/html%20files/main.html"><img src = "C:\Users\Joey\Documents\My Dropbox\Interface Design\Assignments\Assignment 5\photos\Buttons\home button clicked.png" ondragstart="return false" onselectstart="return false" ></a>

<a href="file:///C:/Users/Joey/Documents/My%20Dropbox/Interface%20Design/Assignments/Assignment%205/html%20files/product_page.html"><img src = "C:\Users\Joey\Documents\My Dropbox\Interface Design\Assignments\Assignment 5\photos\Buttons\products button.png" ondragstart="return false" onselectstart="return false" ></a>

<a href="file:///C:/Users/Joey/Documents/My%20Dropbox/Interface%20Design/Assignments/Assignment%205/html%20files/account_page.html"><img src = "C:\Users\Joey\Documents\My Dropbox\Interface Design\Assignments\Assignment 5\photos\Buttons\account button.png" ondragstart="return false" onselectstart="return false" ></a>

<a href="file:///C:/Users/Joey/Documents/My%20Dropbox/Interface%20Design/Assignments/Assignment%205/html%20files/contact_page.html"><img src = "C:\Users\Joey\Documents\My Dropbox\Interface Design\Assignments\Assignment 5\photos\Buttons\contact button.png" ondragstart="return false" onselectstart="return false" ></a>

</div>

</head>


<body>

<img src = "C:\Users\Joey\Documents\My Dropbox\Interface Design\Assignments\Assignment 5\photos\products\deal_photo.png">

</body>


</p></center>


</html> 


#2
semprance

semprance

    Programmer

  • Members
  • PipPipPipPip
  • 126 posts
Erm, all the content should be in the body. Also don't use <p>, use <div>. <p>Is for paragraphs of text, whereas <div> is for layers/containers.

EDIT: Sorry, just to clarify, between the <head></head> tags you should put stuff you want to load before the actual page content (scripts, css etc.) and your content (text, images, paragraphs etc.) should go between the <body></body> tags.

Edited by semprance, 28 March 2010 - 03:49 PM.
Lack of clarity.


#3
j.lai

j.lai

    Newbie

  • Members
  • PipPip
  • 21 posts
Yeah I noticed that and changed it to a div.

I have another question now, I used a table for my body of the site
Here is what it looks like
Posted Image

How do I make it so the text in the left and the right box appear at the top of the cell?

here is the code I have for the table:
<center>
<table class ="style">
<tr>
<td class = "border" style = "width: 250px" >
left box
</td>

<td class = "border" style = "width:500px">Welcome to BBMotion! The place to site to go for all the greatest deals on all the newest Blackberries out in market!
Register an account with us today to recieve the best live BlackBerry technical support and order your own BlackBerry!</td>

<td class = "border" style = "width:250px">
right box
</td>

</tr>

</table>
</center>


#4
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
in your CSS class for those to add in this

vertical-align:top;


you could use text align but by using verticle align it will do it to everything in the cell not just text
Posted Image

#5
harlon

harlon

    Newbie

  • Members
  • Pip
  • 2 posts
You can allso use
<td valign="top">
That mean add valign="top" to uour <td> tags.

#6
k4m1k4z1

k4m1k4z1

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
It would also help if you took out all of the Javascript code, just makes it easier to read for the people that are trying to help. But you do have pretty good code.