Is there a way for me to adjust this alignment?

"Newly Arrived" & "Here Comes the Latest". They won't be on the same alignment horizontally. How can I make them appear in a single line?

Check out this demo http://jsfiddle.net/CtCuk/2/

HTML Markup

<div class="top_page">
    <div class='container-general'>
        <div class="annouce-row">    
            <div class='title'>
                Newly Arrived
            </div>
            <div class='annoucement'>
                Here Comes the Latest
            </div>
        </div>
    </div>
</div>

CSS Styling

.top_page{
    text-align: center;
    width: auto;
    max-width: 900px;
    margin: 50px auto 20px;
}

.annouce-row{
    width: 800px;
}

.title {
    padding: 20px 10px;
    background-color: rgb(123, 0, 218);
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    margin: 1px;
    color: rgb(255, 255, 255);
    font-size: 22px;
    width: 70px;
}

.announcement {
    font-size: 24px;
    font-weight: 200;
    color: rgb(0, 174, 218);
    margin-left: 0px;
    width: 600px;
}

Answer №2

Have you attempted using: float:left; in your stylesheet?

Answer №3

.announcement-row
{
     overflow:hidden;
}
.header
{
    float:left;
}
.notice
{
    float:left;
    margin-left:10px;
    margin-top:20px; //Adjust this value as needed
}

There is no div with class .announce, it should be .annoucement. Check out the example here http://jsfiddle.net/AliBassam/cqh49/

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

What are the steps to create a custom progress bar using JavaScript?

I have experience with HTML and CSS. Below is the HTML code: <div id="wrapper"> <ul id="top"> <center><li><a href="#one" class="button">GENERATE</a></li></center> </ul> <div class="box" i ...

Is it possible to change CSS gradients randomly every time the page is refreshed?

Is there a way to randomly cycle CSS gradients each time the page is reloaded? I have defined the following CSS gradients that I want to use: /* Purple */ .fp-hero { background: linear-gradient(20deg, #6e48aa 0%, #9d50bb 73%, #b176cc 100%); } /* Lig ...

Sequentially iterate through elements based on their Data attributes

Assume you are working with HTML elements like the ones shown below <span class="active" data-id="3"> Test 3 </span> <span class="active" data-id="1"> Test 1 </span> <span class="activ ...

Placing an eye icon on the password input field for optimal visibility and positioning

I am currently working on a Node.js project and I am attempting to incorporate an eye icon using Bootstrap into the password input field for visibility. Below is the code snippet of my input field: <div class="container"> <form ...

Creating subpages using IDs can be accomplished by following these simple steps

Currently, I am in the process of developing a website that contains a plethora of information, specifically news articles. Each news article on my site features an introduction and a header. Upon clicking on a particular news article, the full content is ...

HTML5 Drag and Drop: How to Stop Drag and Drop Actions from Occurring Between a Browser and Browser Windows

Is it possible to restrict HTML5 Drag & Drop functionality between different browsers or windows? I am currently working on an Angular2 app that utilizes native HTML5 Drag and Drop feature. Is there a way to prevent users from dragging items out of th ...

Arranging two elements in a div with distinct alignments

I have a variety of elements within a single div. My goal is to align one element to the right and another element to the left within the same container. Here's a look at the code snippet: <div class="image_meaning" style="display: none; backgro ...

Issues arising in Microsoft Edge due to multiple media queries being utilized

Currently, I am in the process of developing a webpage that needs to be responsive across various screen sizes. To achieve this, I have incorporated CSS media queries within my stylesheets. While everything functions properly when tested on Firefox and Ch ...

Activate the sliding toggle feature on click for all div elements

Whenever a specific li element is clicked, I aim to open its corresponding div element. This is the code snippet I currently have: <ul class="no-padding pro-list"> <li><a href="#" class="pro-1 pro">A</a> <div class= ...

Unable to apply background-color CSS in playwright is not working as expected

I have been encountering an issue with applying the background-color CSS property in a Python template using the playwright package. I initially attempted to apply inline CSS style="background-color:red", then tried using a script tag with JavaScript, an ...

What is the best way to showcase a PDF file on a webpage with multiple thumbnails using JavaScript or jQuery?

I recently undertook a project at work that involved displaying multiple PDF thumbnails/images on a webpage. These files were dynamically loaded from a directory on my system. Each thumbnail corresponded to a PDF file stored in a different directory. My g ...

"Encountering issue with SCSS variable not being applied to background in file

$enable-grid-classes: false; $enable-cssgrid:true; $deepBlue: #032f3e; body { --bs-body-bg: orange ; } @import "https://fonts.googleapis.com/css2?family=Space+Grotesk:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="463121 ...

Conceal a script-generated div using CSS styling

Using the code below, you can create an HTML chatbox with a link in the top panel and multiple child divs. The structure is as follows: cgroup is the parent of CBG, which is the parent of CGW, and CGW is the parent of the div I want to hide. How can I u ...

Using CSS to replace the valign attribute

I have been working on positioning content within a table row. The row contains 2 other tables and 1 small thumbnail image in separate cells. Initially, I used valign="top" to position the row, which aligned the contents of all columns to the top. However ...

How to conceal certain sections of HTML using jQuery

Currently, I am in the process of creating a "news" page for a website. My goal is to only show the first 15 lines of each news article when the page is loaded, creating a neat appearance for visitors. After the 15th line, I include a "read more" link tha ...

Error: jQuery Datatables Library encounters an issue with undefined variable "oColumn"

I'm encountering an issue with implementing the jQuery Datatables library on my Joomla website's table. The script partially styles the table, but then stops (changing header and text colors, but missing datatables controls). http://datatables.ne ...

CSS selector for the 'second next' element, checkboxes and labels within MVC forms

I found a helpful resource that explains how to style checkboxes using CSS. It suggests using the + selector to target the label immediately following the checkbox: input[type="checkbox"]{} input[type="checkbox"] + label {} However, I encountered an issu ...

Unleashing the power of Sass and CSS in your Next Js project

Trying to incorporate sass and css modules into my next.config.js has been challenging due to an error I keep encountering: Failed to compile. ./node_modules/@riskalyze/react-ui/node_modules/@riskalyze/calendar/assets/index.css Unknown word (1:1) > 1 ...

Restricting specific devices and browsers access to my website

Is there an effective way to prevent outdated browser versions and mobile devices from accessing my website? I want to provide a message informing them of the compatible browsers for the site. ...

Having difficulty configuring particlesJS as the background

If you're looking to create a three-page single scrolling webpage with particlesJS as the background, consider using the following resources: particlesJS Website and particlesJS Github Page. An issue arises when trying to set particlesJS as the back ...