There is a clear space between the primary content and the column floated to the right

I am struggling with creating a gap between the main content and the floated right column in my website. Despite attempting to adjust it, I cannot seem to achieve the desired spacing between the right column and the main body.

    <head>
        <title></title>
<link href="style.css" rel="stylesheet" type="text/css">

</head>
    <body>



<div id="header"></div>
<div id="leftcolumn">
<ul> <a href=""></a></ul>
<ul> <a href=""></a></ul>
<ul> <a href=""></a></ul>
<ul> <a href=""></a></ul>
<ul> <a href=""></a></ul>
<ul> <a href=""></a></ul>
<ul> <a href=""></a></ul>
<ul> <a href=""></a></ul>





</div>




<div id="content"><p class id="pcenter"></div>
<div id="rightcol"> Right text goes here</div>
<div id="footer">
<div id="footerp">
<p> </p>

</div>  
</div>


    </body>

</html>

CSS


    body    {
margin: 0px;
padding: 0px;
        }
#header
        {
background-image: url(images/Logo.jpg);
background-size: 100%;
clear:both;
height:420px;
width:100%;
background-image:url(images/Logo.jpg);
background-repeat:no-repeat;


        }

#leftcolumn
        {
background: #b048b5;
float: left;
width: 19%;
height: 500px;
border-style:solid;
border-width: 5px;
border-color:#000001;

        }
#rightcol
        {
background: #b048b5;
float: right;
border-style:solid;
border-width: 5px;
border-color:#000001
width: 20%;
height: 500px;
        }


#content{
border-style:solid;
background:white;
border-width: 5px;
border-color:#000001;
float:left;
width: 60%;
height: 500px;
text-align: center;
font: 16px;

        }


#footer{
background: #000000;
clear: both;
font:16pt;
font:#FFFFFF;
width: 100%;
border-style:solid;
border-width: 1px;
border-color:#000001
        }       
#footerp
        {
color: white;
text-align: center;
        }           

#pcenter
        {
text-align:center;
        }

Answer №1

Position the information in your right-hand column.

<div id="rightcol"> Insert text for the right side here </div>
<div id="content"><p class id="pcenter"></div>

Consider that when you float content, it may interact with elements above it in the stacking order.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Converting HTML into an image in a Node.js Buffer

Can you suggest a simple method to convert a raw HTML string, like the following: <b>Hello World</b> into a regular PNG image in Node.js Buffer form? I've been exploring various npm packages for a solution that supports this functionali ...

attempting to shift course, but finding no success

I'm attempting to include dir=rtl or direction: rtl in the CSS, but it doesn't seem to have any effect on the browser and the content still displays left to right. What steps can I take to fix this? This template is pre-made from Colorlib. It&ap ...

Trouble with jQuery click event on dynamically generated elements

I have a jQuery function that iterates through each element inside a specified div (#container) and triggers a JavaScript alert whenever a span is clicked. Everything functions correctly when the spans are static. However, when I include code like this: ...

What is the best way to have three divs displayed in a row - either all inline or all block, without having two displayed inline and one displayed

I am facing an issue with a set of three inline divs that need to be displayed either in a row or in a column if they do not fit within their container width. In cases where the container is too narrow for them to fit in one row, but not narrow enough to c ...

Design the header and body of the table in a visually appealing format

$("input:checkbox:not(:checked)").each(function() { var column = "table ." + $(this).attr("name"); $(column).hide(); }); $("input:checkbox").click(function() { var column = "table ." + $(this).attr("name"); $(column).toggle(); }) <script src="h ...

Need help with JQuery mouseOver fading in twice when you only want it to fade in

The version can be displayed here. I'm looking to have the current text fade away and the new text fade in. Strangely, it seems to fade in twice for some reason. $(window).load(function(){ var originalTitle = $('.Pinctitle').text(); $(&apo ...

Reveal a concealed div upon submitting an HTML form to display the resulting output

I have created an HTML form to gather information about a person's name and location. Once the user submits the form, I want the output to be displayed at the bottom of the page using PHP echo. My specific requirement is, To initially hide the outp ...

The jQuery table sorting function seems to be malfunctioning

Having trouble with the sorting function in the JavaScript files. My page contains the following scripts: <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="js/jquery.tablesorter.min. ...

Display two images consecutively within a single img tag

My goal is to display two images using a single <img /> tag. The first small image will be loaded and shown using the src attribute, while the second large image will be contained within the data-src attribute. Only one image will be displayed at a t ...

Is the positioning of 'clear:both' influenced by external floated elements?

I have 2 divs. One is styled with float:left and has a width of 100px, making it red. The other div is green and has a margin-left:101px, but is not floated. Within the green div, I inserted another div with two floated elements: The outcome is as follo ...

Is it possible to use PHP to retrieve and display an entire webpage from a separate domain?

Currently, I am working on a PHP program that allows me to load a complete webpage and navigate the site while remaining in a different domain. However, I have encountered an issue with loading stylesheets and images due to them being relative links. I am ...

Paper-dropdown-menu component failing to render properly in web browser

Encountering an issue with the rendered HTML for a basic paper-dropdown-menu. Instead of displaying as a styled menu, the list items are just appearing as a plain list on the page. Upon clicking the rendered paper-input component within the dropdown, the ...

Is it possible to reverse the effects of @media queries for min/max width and height?

I rely on http://www.w3.org/TR/css3-mediaqueries/ to customize my design based on the available viewport size. When I need to adjust the breakpoints, I struggle with negating @media (min-width: 500px), which overlaps with (max-width: 500px). To counter th ...

Tips for showcasing a table generated from various input types on a separate page after pressing the submit button

After creating two JavaScript functions, I am eager to utilize both of them upon pressing the submit button on my form. The first function is already integrated into the submit button and activates a paragraph display upon submission. Now, I intend to sh ...

Unable to retrieve data from input field using ajax

After submitting the form, I am trying to retrieve the value from the input field named "phone" using jQuery. However, all I get is a null value and I can't figure out why it's not working. Strangely, there are no error messages in the console ei ...

I aim to have the capability to read numbers entered into text fields within a form prior to the form being submitted

I am currently working on a website where users can create brackets for the World Cup by guessing scores and winning teams. Right now, they have to manually fill in the bracket. I would like to implement a feature that reads what users are inputting while ...

Having problems implementing FadeIn/Out effect while transitioning images on list item hover

I have managed to create a menu where the photo changes when hovering over a menu list item. However, I am struggling to add a fade in/out effect for a smooth transition between the photos. Here is the code: <div id="menu"> <img src ...

The autocomplete attribute for "current-password" in React is failing to display the form fill option

Encountering an issue with the autocomplete="current-password" attribute not displaying the current password in a form, even though it is saved in Chrome. The input field is enclosed within a form. Is anyone else experiencing problems with the autocomplete ...

I am having trouble aligning the element perfectly in the center

I'm working on a radio input design featuring a circle in the middle, achieved via the pseudo element ::before However, I've noticed that when the input size is an odd number, the centering isn't quite perfect This issue seems more promine ...

Tips for transforming the appearance of an asp.net page with asp:Content into a stylish css-page

Currently facing an issue where I am unable to change the background-color in my CSS file. As a workaround, I have placed the style directly within an ASP page. <asp:Content Id="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> ...